OpenVPN route all traffic via VPN

To add default route via VPN server add following lines into your server’s configuration file (usually /etc/openvpn/server.conf).

[code]
push “redirect-gateway def1”
push “dhcp-option DNS 8.8.8.8”
[/code]

DNS option may be required, if you are having troubles with name resolution after connecting to VPN.

Leave a Reply

Your email address will not be published. Required fields are marked *