Route all trafic trough OpenVPN connection.

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ZaxonXP45
OpenVpn Newbie
Posts: 1
Joined: Thu Mar 22, 2018 4:35 pm

Route all trafic trough OpenVPN connection.

Post by ZaxonXP45 » Thu Mar 22, 2018 4:59 pm

I have Asus router RT-AC3200 where I could set up the OpenVPN server, then I exported client.ovpn file which I successfully imported and used on OpenVPN client for android (official app from OpenVPN.org). When I use Andoid OpenVPN client with the ovpn file then all the traffic is routed trough VPN tunnel to my router. No problem here.

However...

On the Linux machine (Debian Jessie 8.10) I managed to set up the VPN connection using the settings from the client.ovpn file (Importing did not work in the gnome-network-manager). I can establish VPN connection without any error.

But...

How to redirect all traffic to go trough this VPN connection (including DNS queries)?
I saw the HOWTO entry about it, but I could not make it work. Could somebody help me to understand what kind of "magic" android OpenVPN client does that all the traffic is redirected? What should I configure on the Linux client in order to make it work the same way as on Android? How to revert the changes to the original state?

I can provide my configuration files if necessary, but I need some guidance in this.

Kind regards,
Zaxon

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route all trafic trough OpenVPN connection.

Post by TinCanTech » Thu Mar 22, 2018 5:56 pm

For Linux you probably need this in your client config file:

Code: Select all

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Post Reply