LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   blocking social networking sites (https://www.linuxquestions.org/questions/linux-server-73/blocking-social-networking-sites-4175490896/)

ishanbhardwaj390 01-10-2014 11:34 PM

blocking social networking sites
 
how i block bit torrent & social networking sites on centos 4"" help me""

jamison20000e 01-10-2014 11:46 PM

Hi. This link could be useful: http://www.linuxquestions.org/questi...et-4175469542/ to start... best wishes and have fun. :)

pantdk 01-12-2014 01:28 AM

for blocking social site with below setting

blockfiles urlpath_regex -i "/etc/squid/blocks.files.acl
badsites dstdomain "/etc/squid/badsites
badwords url_regex -i "/etc/squid/badwords""

##should be above of of acl before allow
http_access deny badwords
http_access deny blockfiles
http_access deny badsites


######EXAMPLE BELOW #######
acl CONNECT method CONNECT
http_reply_access deny flash
http_access deny badwords
http_access deny blockfiles
http_access deny badsites
http_access allow internet
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports


for blocking torrent download can try through delay pool & iptables
http://linuxgazette.net/108/odonovan.html
http://www.squid-cache.org/Doc/config/delay_parameters/

TB0ne 01-15-2014 09:10 AM

Quote:

Originally Posted by pantdk (Post 5096504)
for blocking social site with below setting

blockfiles urlpath_regex -i "/etc/squid/blocks.files.acl
badsites dstdomain "/etc/squid/badsites
badwords url_regex -i "/etc/squid/badwords""

##should be above of of acl before allow
http_access deny badwords
http_access deny blockfiles
http_access deny badsites


######EXAMPLE BELOW #######
acl CONNECT method CONNECT
http_reply_access deny flash
http_access deny badwords
http_access deny blockfiles
http_access deny badsites
http_access allow internet
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

...and there are also examples in the Squid documentation, at the Squid website that explain all of this is more detail.
Quote:

for blocking torrent download can try through delay pool & iptables
http://linuxgazette.net/108/odonovan.html
http://www.squid-cache.org/Doc/config/delay_parameters/
Sorry, no. You CANNOT BLOCK TORRENTS with squid. The best you can do is block downloading of a .torrent file type, but this has been asked (and answered), MANY times on this site. Squid is an HTTP proxy...which means it works on HTTP...not torrent, SSH, email, or any other protocol. To block torrents, you need a layer 7 filter, which is NOT part of squid. You can implement them in software or with a purpose-built hardware device, both of which are easy to find with a brief Google search.

pantdk 01-17-2014 06:04 PM

yes torrent is using random port which may not possible to block but if your not using the hardware firewall then we can try this with iptables. this is not a permanent solution agreed


All times are GMT -5. The time now is 01:24 AM.