Blocking certain sites through Smoothwall. A bit difficult to configure as there is no out-of-the-box option in the web GUI for it.
Process:
Make sure that you have Squid (web proxy) enabled on Smoothwall. Its also worth noting that if you do not enable transparent mode, this will not work for people who do not have the proxy set in the browser on their computer.
These are the steps:
- login to the Smoothwall box as root
- type: cd /var/smoothwall/proxy/
- type vi badsites.txt (this will create a new text file which you can write all the site names you wish to block in)
- press the 'i' key to enter 'insert mode'
- Enter each site you want to block on a seperate line
- When finished type :wq and hit enter, this will write the document and quit it.
- Now we need to block the sites in this text file in the Squid acl file. So type: vi acl
- find a spare line and hit the 'a' key to enter append mode
- Insert the following lines:
acl blocked_sites url_regex "/var/smoothwall/proxy/badsites.txt"
http_access deny blocked_sites - Then type ':wq' to save and quit.
- Go to the http configuration for Smoothwall and click on the web proxy. Click the save button in order to restart the proxy service.
Links:
http://martybugs.net/smoothwall/squid.cgi
I look the site it was a very good and very informative in many aspects thanks for share such a nice work.
ReplyDeleteCheck more details here : regulation.
how to block content wise and categories wise websites in command mode
ReplyDelete