I am trying to setup a proxy to filter the internet traffic. In order to do so have arrived at the following combination Client -> Openvpn -> squidproxy -> internet Squid proxy and openvpn have been installed on the same ubuntu server. Installed openvpn though this Digital Ocean tutorial. Openvpn is currently working and routing the traffic correctly to internet. But I have not been able to force the requests to go through squid proxy, even after setting it up to route transparently and adding a few iptables configuration.
I have also added this configuration post which the http requests on port 80 do not reach internet nor reach the squid proxy (
http_port 3128 transparent is defined in
squid.conf to transparently intercept the request)
-A PREROUTING -i tun0 -p tcp --dport 80 -j DNAT --to 10.0.2.15:3128 -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128