1

Im having trouble figuring out which is the best way to redirect the traffic for a certain subnet.

Basically i want to deny the access for a certain subnet to the internet. And i want it to always redirect the user to a specific (local) website.

We have a squid3 + squidguard proxy here that is managing the blocking of certain websites. I thought i could do it with it by using a whitelist and block everything else.

I tried to add this to the squidguard config

dest whitelist {
    domainlist      whitelist/domains
    urllist         whitelist/urls 
}


test{
                pass  whitelist none
                redirect http://bla.intern
}

and added the url http://bla.intern in the domains and urls file

Now i can visit http://bla.intern but when visiting other websites its not redireccting me just denying access.

Is there a better way to do this? Maybe over iptables?

  • little Update. It IS blocking urls but only direct Urls like google.com / reddit.com. As soon as there is anything behind it i can load it. like a google search or reddit.com/r/blah I thought i could do it with expressions but somehow it doesnt work aswell. Anyone an idea :)? – amam Sep 20 '17 at 8:23

Your Answer

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

Browse other questions tagged or ask your own question.