LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   unblock particular ip to access facebook using squid (https://www.linuxquestions.org/questions/linux-server-73/unblock-particular-ip-to-access-facebook-using-squid-4175425763/)

shakul hameed 09-05-2012 07:22 AM

unblock particular ip to access facebook using squid
 
I Have blocked facebook for all using

acl banned_websites dstdomain -i "/etc/squid/banned_websites"
http_access deny banned_websites

But now i need to give access to this particular Ip Address to acess facebook

acl special_client src 192.168.50.107
acl facebook dstdomain .facebook.com
http_access allow facebook special_client
http_access deny facebook
http_access allow all

After reload its not working. It is still blocked


can any one help me

bathory 09-05-2012 10:38 AM

Hi,

Use
Code:

acl special_client src 192.168.50.107
acl facebook dstdomain .facebook.com
http_access deny facebook !special_client
http_access allow all

Regards

shakul hameed 09-05-2012 01:42 PM

Thanks


acl NO_RESTRICTION src 192.168.50.107 can i use this...

bathory 09-06-2012 02:00 AM

Quote:

Originally Posted by shakul hameed (Post 4773471)
Thanks


acl NO_RESTRICTION src 192.168.50.107 can i use this...

I don't get your questions. You can name your ACLs whatever you want and just use that name in http_access directive(s). E.g replace "special client" with "NO_RESTRICTION" in the previous post congiguration options.

Regards

shakul hameed 09-06-2012 07:41 AM

Once Again Thanks

Its worked with following script

acl user src 192.168.50.107
acl facebook dstdomain .facebook.com
http_access allow facebook

bathory 09-06-2012 11:48 AM

Quote:

acl user src 192.168.50.107
acl facebook dstdomain .facebook.com
http_access allow facebook
Please note that with that configuration, squid allows anyone to access facebook.com

shakul hameed 09-07-2012 12:33 AM

I checked its blocked for others expect particular ip address.. Sure i ill check that out again for confirmation.


All times are GMT -5. The time now is 07:53 AM.