0

I have an OpenVPN server on which I'd like to redirect all HTTP requests to a certain web server. In other words, if one client tries to access (for example. Google.com) they should be redirected to the specified web server instead of their requested destination.

What should I do to accomplish this? Can't I just use iptables and redirect all of the eth0 traffic?

iptables -t nat -A PREROUTING -p tcp -m multiport --dport 80,443 -i eth0 -d ANOTHER_WEB_SERVER_IP  -j DNAT --to-destination ANOTHER_WEB_SERVER_IP

Or should I do something to the openvpn tun interface?

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.