Squid3 - Refuses to read txt file for ACL restriction. :( !

icanhascpu2

Senior member
Jun 18, 2009
228
0
0
Here is the code:
Code:
acl ads dstdomain "/etc/squid/ad_block.txt"
http_access deny ads


Inside the ad_block.txt file is one line for testing ".google.com" no quoats



Now ive put inside ad_block.txt a line that i KNOW works if I use it directly like this:
Code:
acl foo dstdomain .google.com
http_access deny foo

That blocks .google.com Simple. However i cannot get the example above that to read the list to deny all in that list. Including that one i KNOW works. What gives?!? Grrr
 
Last edited:

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Have you looked at the squid logfiles to see if it has any warnings or errors?
 

icanhascpu2

Senior member
Jun 18, 2009
228
0
0
Thank you for the reply.


Yes I looked though them and see nothing to indicate if the file has been read or if it tried to read it and could not or what.

The file name currently is testblock.squid
It contains .google.com

Code currently is:
Code:
acl ads dstdomain "/etc/squid/testblock.squid"
http_access deny ads

I tested (again) this with code:
Code:
acl ads dstdomain .google.com
http_access deny ads

And it works (blocks google everything else loads)
Ive tried renaming the file. Giving it no .txt~. Checking permissions on the file. I also sacrificed a large bear that I wresteled with my bare hands to the cruel squid gods. I really thought that last one would work....

I should note:
I entered a linux terminal for the first time 2 days ago. So bare with me here im a noob. Also, I am logged in as root while I get used to things a bit more. Would this cuase an issue with this (aside from security issues).
 
Last edited:

icanhascpu2

Senior member
Jun 18, 2009
228
0
0
For ls -l /etc/squid3/testblock.squid

Code:
-rw-r--r-- 1 root root 12 Apr  8 10:42 /etc/squid3/testblock.squid
 

icanhascpu2

Senior member
Jun 18, 2009
228
0
0
After many other things, I came back to this. Looks like just moving the file to the desktop fixed this. So clearly it wasnt able to access it in the folder where its already accessing other config files...? Strange but whatever.