Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i want lo block some porn domains, i tried this squid configuraztion:

acl localnet src 10.0.0.0/8  
acl loggedUser  proxy_auth REQUIRED
acl proxyUser external nt_group ProxyUser
acl pornDomains dstdomain "/etc/squid/porndomains.txt"

http_access deny !localnet
http_access deny !loggedUser
http_access deny pornDomains
http_access allow proxyUser

And this is my porndomains.txt:

youporn.com

During squid startup i get no errors or warning, but i still access to youporn.com. This from access.log:

1342771140.754    283 10.0.0.95 TCP_REFRESH_MISS/200 11377 GET http://www.youporn.com/ admin DIRECT/31.192.116.24 text/html
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Try to put a . before your domains in the porndomains.txt.

You are blocking yourporn.com, not www.youporn.com or whatever.youporn.com. .youporn.com will block all of those.

Happy testing!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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