localzuk Posted June 10, 2013 Posted June 10, 2013 I'm in the midst of setting up SquidGuard and am at a bit of a loss as to how to configure it to do nothing but rewrite Google searches. This is my config - and it doesn't do anything: rewrite google_search { s@(google\..*/search?.*q=.*)@\1\&safe=vss@i } acl { default { pass none rewrite google_search } } The rewrite rule is copied verbatim from another site which confirmed it does what I want, but it isn't rewriting. Can anyone give me a clue as to how I get this thing working?
X-13 Posted June 10, 2013 Posted June 10, 2013 I swear the safesearch paramiter is "#safe=active" Le EDIT: Yup. Just checked it.
localzuk Posted June 10, 2013 Author Posted June 10, 2013 Ok, regardless, it isn't doing the rewriting - ie 'safe=vss' or 'safe=active' don't appear in the URL at all.
localzuk Posted June 10, 2013 Author Posted June 10, 2013 I've even tried @Geoff's rules here: http://www.edugeek.net/forums/windows/16973-enforce-google-safesearch.html
tom_newton Posted June 10, 2013 Posted June 10, 2013 You sure you're not going through on https? That'd stop it working!
localzuk Posted June 10, 2013 Author Posted June 10, 2013 Yup. Just manually typed it as http and it doesn't do anything still.
Geoff Posted June 10, 2013 Posted June 10, 2013 You accessing the right port on the client (best way is to force Squid to bind on the loopback, then you can't have any 'accidental' bypassing of SquidGuard)?
localzuk Posted June 10, 2013 Author Posted June 10, 2013 (edited) What do you mean? I have it running as the 'url_rewrite_program' in the squid config. Squid is running on port 8080. Squidguard is being called - it has 5 processes running (per the squid config), and the squidguard log is reporting stuff: 2216 no ACL matching source, using default Edited June 10, 2013 by localzuk
localzuk Posted June 11, 2013 Author Posted June 11, 2013 (edited) If I run the command: echo "http://www.google.co.uk/seach?q=test / - - GET" | squidguard -c /usr/local/squidguard/squidguard.conf in MinGW, Squidguard replies as it should with: !GET! http://www.google.co.uk/search?q=test&safe=active /- - - I suspect this is down to my use of MinGW... Edited June 11, 2013 by localzuk
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now