0

Im trying to block one page from website on Ubuntu. For example the website is www.linuxquestions.org which I want to allow, but www.linuxquestions.org/reviews/ I want to deny. I found out that I cant use etc/hosts. So Im using squid proxy. I have file with URLs which I want to block.

File looks like this:

https://maps.google.com/
maps.google.com
www.linuxquestions.org/reviews/

I set this file to be blocked in /etc/squid/squid.conf

acl blocksites dstdomain "/etc/squid/file.squid"

For maps.google its working, when google Im able to use, but maps.google not. Is it possible to block only www.linuxquestions.org/reviews/ but everything else on www.linuxquestions.org will be accessible?

0

in /etc/squid/squid.conf dont use acl blocksites dstdomain "/etc/squid/file.squid" but

acl blocksites url_regex "/etc/squid/file.squid"

then in file it can be only .linuxquestions.org/reviews no full url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.