Hai everyone, today i will share with you all about how to block a website. usually people block a website such as facebook.com or youtube.com in shcool's or college computer lab to prevent student to do something unuseful during lesson session in the class.
There's so many way to do this thing (blocking a website) but me, i used CentOs as a server and install Squid and Webmin inside to set the proxy.. ok, let's start
the things that i used :
1. VmWare (a virtual machine to install another OS in our computer such as linux,win7,xp, etc..)
2. CentOs
3.Squid
4.Webmin
**Squid and Webmin already have in CentOs ..you just need to find its installer and install it. if you can't find, just download and install automatically form the internet
1. install VmWare
2. install CentOS in VmWare by clicking Click a new virtual machine
my centOs' desktop
3. install Squid
find squid's installer in cd /media/CentOs_5.3_Final/CentOs
if you didn't find an installer, you can download and install it automatically from the internet using this command yum -i install <Program name> example : yum -i install squid .make sure you have an internet connection
ls |grep <program name name> :: to find file instantly using name. the name of file installer will end with .rpm (in window .exe) ..for example ls |grep squid
rpm -ivh <program name name> :: command to start installation process for example
rpm -ivh squid
rpm -q <program name> :: command to check either the program already installed or not
rpm -q squid
/sbin/service <program name> start : command to start a program
/sbin/service <program name> stop : command to stop a program
/sbin/service <program name> restart : command to start a program
/sbin/service <program name> status : command to check the status of a program
** type program name without < > symbol for example /sbin/service squid status
** all of the program that you want to install using this step. just change the program name
4.install Webmin (local host)
install Webmin using the same way like squid. just change the program name..
when finish installing, go to mozillah firefox and go to local host by typing this address http://localhost.localdomain:10000/
now, follow this step :
a) go to webmin and then click "server"
b) now, choose "squid proxy server"
c)enter to "access control"
d)choose "web server regexp" and click "create newACL"
e)put the website url that you want to block (but it can't block HTTPS website.only http)
f)go to proxy restriction and the make the website that you want to block be the first in the row and the return to squid index
g) after finish, go to "ports and networking" to set the port for the network
h) default port is 3128 (you can change if you want...after that click save and return to squid index
i)now, start squid
j) go to your web browser and go to option
k) click advance
l) choose network and go to setting
m) choose "manual proxy configuration" and then enter your server's ip and port. after finish. press ok.
now, your server will start working and someone will not be able to go to the web page that has been block.
feel free to share your though and knowledge about this with me..and feel free to try this tutorial too :)