Tuesday, March 12, 2013

how to set proxy to block website using Squid and Webmin


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 :)




13 comments:

  1. You can Unblock Youtube and other website by http://www.youtubeunblocker.pk/

    ReplyDelete
  2. Use "URL Regexp" instead. It blocks perfectly.

    ---
    I am applying this in a school's computer lab environment as well. I was trying the other proxy rules but they don't work.

    ReplyDelete
  3. WOW!! Very informative blog and useful article. Please visit this site if you want more detail
    access eMp3World in UK

    ReplyDelete
  4. Squidblacklist.org is the worlds leading publisher of native acl
    blacklists tailored specifically for Squid proxy, and alternative formats for all major third party plugins as well as
    many other filtering platforms. Including SquidGuard, DansGuardian, and ufDBGuard, as well as pfSense and more.

    There is room for better blacklists, we intend to fill that gap.


    It would be our pleasure to serve you.

    Signed,

    Benjamin E. Nichols
    http://www.squidblacklist.org

    ReplyDelete
  5. WOW!! Very informative blog and useful article. Please visit this site if you want more detail Bee MP3 UK proxy

    ReplyDelete
  6. how to unblock websites using squid proxy server??

    ReplyDelete
  7. I read your article and get very important information in addition if you have any query you can click here.
    http://websiteproxy.co.uk/bomb-mp3.com.html

    ReplyDelete
  8. I like your article it wordpress installation service is very nice would like to
    access Bee MP3 in UK

    ReplyDelete
  9. I like the resources which you mention in your blog but there are more resources which you can use. I hope in you next article you include these resources too. insurance, insurance, insurance, insurance, insurance, insurance, insurance, insurance, insurance, insurance, insurance, insurance.

    ReplyDelete
  10. We have better domain blacklists. Period.

    http://www.squidblacklist.org

    ReplyDelete
  11. I want to block a particular HTTPS website. How can I do that? Can pfSense do that?

    ReplyDelete
  12. free premium blogger template

    https://technonews5731.blogspot.com

    ReplyDelete