LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   website block by using proxy server (https://www.linuxquestions.org/questions/linux-security-4/website-block-by-using-proxy-server-870707/)

kuddush 03-24-2011 08:14 AM

website block by using proxy server
 
Dear,
i am using RHEL 5. i configured proxy server. now i want block one website. can anyone help me how to configure.
regards
kuddush

linuxgurusa 03-24-2011 08:23 AM

Quote:

Originally Posted by kuddush (Post 4301616)
Dear,
i am using RHEL 5. i configured proxy server. now i want block one website. can anyone help me how to configure.
regards
kuddush

These lines is what you need
-----------------------------
acl blockfiles urlpath_regex "/etc/squid/badcontent.acl"
acl blocksites dstdomain "/etc/squid/badsites.acl"

acl mynetwork src 192.168.10.0/24

http_access deny mynetwork blockfiles
http_access deny mynetwork blocksites

---------------------------------------

Contents of /etc/squid/badcontent.acl file

\.[Aa][Vv][Ii]$
\.[Mm][Pp][Gg]$
\.[Mm][Pp][Ee][Gg]$
\.[Mm][Pp]3$

Contents of /etc/squid/badsites.acl file

.facebook.com
.microsoft.com
.cnn.com
.youtube.com

win32sux 03-24-2011 11:05 PM

And please do search LQ before posting your question(s).

This one has been asked and answered here a gazillion times.


All times are GMT -5. The time now is 04:48 AM.