If you want to block some website you must use proxy to block it. OK let's try it now, i used Linux OS(zencafe), squid 3.0, and snack :D
First download the squid from the official website, then extract it (ex:/home/admin/) now go to the directory where you extract squid you should login with root then type "./configure --prefix=/usr/local/squid" from console/terminal wait............ After that type "make all" now you can relax and eat your snack :D if that step finish type "make install" to install squid.
OK next step is configure file squid.conf,
There are 3 ways to block website
1. block using domain ex:www.playboy.com
2. block using keyword ex:porn, sex
3. block using IP Address.
ok i'll just explain the first way. copy file squid.conf into home directory, and change the permission. login using root via terminal/console type "cp /usr/local/squid/etc/squid.conf /home/admin/" then type "chmod 777 /home/admin/squid.conf" edit that file using editor, find "http_access deny all" without # sign. Change it to "http_access allow all". now "type acl step-1 dstdomain "/usr/local/squid/etc/block-site"
http_access deny cara-1"
nb:using quote for dstdomain "...."
put that before "http_access allow localnet" and "http_access allow all". save it now.
next is make file "block-site" and add the site.
nb:
save it in /home/admin/. now copy that files into squid directory. Use "cp /home/admin/squid.conf /usr/local/squid/etc/" and "cp /home/admin/block-site /usr/local/squid/etc/"
Ok now type "/usr/local/squid/sbin/squid -z" using root access. Upsss..... there some error. Change the permission folder with "chmod -R 777 /usr/local/squid/var/". type that command again. after that type "/usr/local/squid/sbin/squid" to run it. Finish..... ..............not yet
Open your browser(i'm use firefox for linux) click Edit -> Preferences choose Advanced then choose tab Network then click Setting check "Manual Proxy Configuration" add 127.0.0.1 Port 3128 check "Use this proxy server.......". Then try it now........ Finish................................
nb:restart your browser to take the effect......
Wednesday, February 27, 2008
Using Squid 3.0 under Linux to Blocking some website!!!
Subscribe to:
Post Comments (Atom)


0 comments:
Post a Comment