I have a personal VPN that I use on my tablet for public wifi protection.

Adblock+ is limited on android in that you need to set up a proxy for it to work, and this isn't ideal. Before I started using openvpn I had a squid server that had a large list of domains to block that were used by advertising/tracking services. Now, with openvpn, I lost that functionality.

Is there any way I can combine squid with openvpn to get this same result or is there a way to block things solely through openvpn? what are my options?

migrated from serverfault.com Aug 1 '13 at 17:47

This question came from our site for system and network administrators.

  • you can transparently proxy the data coming over the vpn to a local instance of squid on your vpn termination device. Or you you can just manually configure your proxy to use a squid box somewhere accessible via openvpn? are you having issues with that? – Doon Aug 1 '13 at 18:15

OpenVPN doesn't do application level filtering.

squid doesn't care whether the traffic wanting to proxy through it is coming from a real or virtual NIC. So it will work if the system running it is also on the VPN (e.g. running the OpenVPN server) and has access to the Internet (which it should). It's been awhile since I've played with squid but IIRC you need to add the subnets that are allowed to use the proxy to squid's configuration file. So, assumng this same system is on the VPN, just add the VPN subnet.

If you are using iptables transparent proxying to automatically send all port 80 or 443 traffic through squid, change your iptables rules to work with tun0 or whatever the VPN interface name is, instead of eth0 or similar.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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