I would like to redirect the traffic that goes through my OpenVPN gateway to Privoxy, like so:

OpenVPN client->Internet->OpenVPN gateway->Privoxy->Internet->Webserver (and vice versa)

So far I managed to get the OpenVPN gateway working fine. Connecting to the Privoxy proxy appears to be working aswell. But redirecting port 80 traffic via iptables just won't work (external webservers are unreachable). What would my iptables config file have to look like?

Thanks in advance

PS: This is what I came up with so far...

iptables -t nat -A POSTROUTING -o eth0 -s 10.10.10.0/24 -j MASQUERADE

iptables -I FORWARD -i tap0 -j ACCEPT
iptables -I FORWARD -o tap0 -j ACCEPT

# No success with the following line
iptables -t nat -A PREROUTING -i tap0 -p tcp --dport 80 -j REDIRECT --to-port 8118
link|improve this question
What does your iptables configuration look like now? Show us what you've tried. – larsks Feb 6 at 21:58
Is accept-intercepted-requests enabled? By default it's disabled: privoxy.org/user-manual/config.html#ACCEPT-INTERCEPTED-REQUESTS – Giovanni Toraldo Feb 6 at 21:59
@GiovanniToraldo yes, sorry forgot to mention it! – Max Rother Feb 6 at 22:02
@larsks edited the first post! – Max Rother Feb 6 at 22:13
Still no luck. Also tried Squid now. :( – Max Rother Feb 7 at 19:00
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.