LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need ACLs to block particular browser in Squid3 (https://www.linuxquestions.org/questions/linux-newbie-8/need-acls-to-block-particular-browser-in-squid3-942379/)

roopakl 04-29-2012 06:19 AM

Need ACLs to block particular browser in Squid3
 
Hi..All,
I have configured squid3 transparent proxy on Ubuntu 11.10 and everything is working fine.
I would like to allow internet access for only Internet explorer and Mozilla Firefox browsers and would like to deny all other browsers.
I tried as below
Code:

acl firefox browser firefox
http_access deny !firefox

But the above rule is not working for me and still other browsers(chrome, aurora, seemonkey, etc) in the client's PC are able to access the internet.
Hope somebody definitely give me the squid ACLs to achieve this.
Thanks in advance for your kind help.

bathory 04-29-2012 10:06 AM

Hi,

You should use:
Code:

acl good_browser (.*?)Firefox (.*?)MSIE
http_access deny !good_browser

Just keep in mind that user-agents can be spoofed easily.

Regards

roopakl 04-29-2012 11:46 AM

Thank you bathory Guru,
I will check the above rules and let you know.
I could not understand the below.
Quote:

Just keep in mind that user-agents can be spoofed easily.
So I request you to explain with some more.
Thanks & Regards.

bathory 04-29-2012 12:53 PM

Quote:

Just keep in mind that user-agents can be spoofed easily.
So I request you to explain with some more.
Every browser is identified by a user-agent string. For example looking here I get for my browser:
Quote:

Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Now this can be spoofed very easily. For firefox there is an extension that does this on the fly. I guess the same goes for other browsers. If you want to read more about UA (and spoofing), have a look at this wikipedia article.

Regards

roopakl 05-05-2012 12:12 PM

Sorry Bathory Guru,
I had been out of station for my personal works, so could not check and reply back.

Thanks a lot, it worked great.:)
And you clarified my doubts by giving those useful links.

Once again Thank you very much Sir.


All times are GMT -5. The time now is 08:17 AM.