Jumat, 22 Juni 2012

blokir ip tidak bisa login internet

Cara yang aku lakukan :

Buat nat rule untuk webproxy-nya
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
enable webproxy-nya
ip web-proxy set enabled=yes
masukkan content yang ingin di blok
/ip web-proxy access add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 url=*.facebook.com* action=deny comment=situs
Lalu create script (system >> script)
Name : bloksiang
Policy : write, read, policy (yang dicentang)
Source:
/ip web-proxy access enable [/ip web-proxy access find comment=situs]
Name : blokmalam
Policy : write, read, policy (yang dicentang)
Source:
/ip web-proxy access disable [/ip web-proxy access find comment=situs]
Buat scheduler yang diinginkan (system >> scheduler).
name=bloksiang
start-date=Jan/01/2010
start-time=08:30:00
interval=1d 00:00:00
on-event= bloksiang
name=blokmalam
start-date=Jan/01/2010
start-time=18:30:00
interval=1d 00:00:00
on-event= blokmalam
Nah setelah itu maka liat aja hasilnya maka situs yang masuk di dalam list di web proxy akan terblok. Kalo ada banyak situs atau address atau file yang ingin di blok maka tinggal di add di web proxy serta diberi comment yang sama (dalam hal ini saya menggunakan comment=situs), maka pada waktu yang bersamaan semua situs yang ada list akan terblok.
Misalnya :
/ip web-proxy access add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 url=*.youtube* action=deny comment=situs
/ip web-proxy access add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 url=*mpeg* action=deny comment=situs
/ip web-proxy access add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 url=*exe* action=deny comment=situs

0 komentar:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Web Host