Squid ACL hack! help anyone?

Today I tried to implement an acl for the purpose of anoying ad site blocking.
I did th folowing:

I edited squid.conf and the squid.conf-default file.

I added following code to it:
acl ads url_regex "/home/login/badsites.txt"
deny_info ERR_ACCESS_DENIED ads
http_access deny ads

and uploaded the badsites.txt to /home/login.

It's not working....Any help anyone? 
Parents
  • HI,
    squid is 'chroot'ed...
    (man chroot )
    try to copy yourfile to /var/chroot-squid/etc/badhosts
    for squid the location is only '/etc/badhosts.
    You have to edit squid.conf-default.

    Erik  
  • I am sorry I found that out already and was to late to edit the post.
    It however still will not work. Even if I make a link to a non existing badhosts file squid reports no errors when restarting the service. Maybe my badsites.txt is in the wrong format or maybe the code added the the squid.conf-default is wrong?

    Added to squid.conf-default:
    acl ads url_regex "/etc/badsites.txt"
    deny_info ERR_ACCESS_DENIED ads
    http_access deny ads

    example line of badsites.txt:
    127.0.0.1       000freexxx.com

    I am sorry if I am making a fool of myself but I am still learning. 
Reply
  • I am sorry I found that out already and was to late to edit the post.
    It however still will not work. Even if I make a link to a non existing badhosts file squid reports no errors when restarting the service. Maybe my badsites.txt is in the wrong format or maybe the code added the the squid.conf-default is wrong?

    Added to squid.conf-default:
    acl ads url_regex "/etc/badsites.txt"
    deny_info ERR_ACCESS_DENIED ads
    http_access deny ads

    example line of badsites.txt:
    127.0.0.1       000freexxx.com

    I am sorry if I am making a fool of myself but I am still learning. 
Children