LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Squid ACL to allow access to a child URL below a blocked main URL (https://www.linuxquestions.org/questions/linux-server-73/squid-acl-to-allow-access-to-a-child-url-below-a-blocked-main-url-907740/)

soslinux 10-12-2011 04:22 AM

Squid ACL to allow access to a child URL below a blocked main URL
 
Hi all, I do apologize if this is a dupe but I cannot for the life of me think how I would search for this..
I need to allow access to a specific URL that is blocked by another ACL. I have an ACL called denied_domains and it contains amongst others .facebook.com and all IP's falling below this ACL are denied access to Facebook. However the company has a Facebook page and wants employees to be able to access that but only that. So I created a new ACL above denied_domains called specific_sites with the full URL https://www.facebook.com/pages/custfbpagedetail in it :
acl specific_sites dstdom_regex -i https://www.facebook.com/pages/custfbpagedetail but still no access. Is this possible and if so how? Thanks and regards to all.. Roger

bathory 10-13-2011 02:47 AM

Hi,

Better use a url_regex acl containing the url you want to allow.
Also note that you have to use a referer_regex acl, or else the page you want to see will be incomplete, as it uses objects from other URLs inside the facebook.com domain.
So try this:
Code:

acl good_facebook url_regex -i ^https://www.facebook.com/pages/custfbpagedetail
acl ref referer_regex -i custfbpagedetail

http_access allow good_facebook
http_access deny denied_domains !ref

Regards


All times are GMT -5. The time now is 05:04 PM.