LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Blocking IP Addresses using Squid (https://www.linuxquestions.org/questions/linux-newbie-8/blocking-ip-addresses-using-squid-920319/)

hwarui91 12-24-2011 02:51 AM

Blocking IP Addresses using Squid
 
Hi all,

I am trying to block facebook using iptables.

My setup is such that my server is acting as a filtering proxy. What i want to do ultimately is blocking sites like facebook etc.

One problem with it is that with iptables, i can't seem to do it because facebook has too much ip. Therefore i am unable to explicitly block the ip address that facebook uses.

Second problem is that when i do it with squid proxy configuration, i was not able to block it because of the secure channel with https which is suppose to defeat man in the middle. Which of course, my setup would be something like a man in the middle.

Hope you guys would be able to give me advise. Thanks

bathory 12-24-2011 04:12 AM

Hi,

You should use the domain name to deny access, like this:
Code:

acl facebook dstdomain .facebook.com
...
http_access deny facebook
...

Regards


All times are GMT -5. The time now is 09:00 PM.