User avatar
XueHai8
Posts: 27
Joined: Mon Jul 24, 2017 12:19 pm

OpenVPN Client on tun1 fails, tun0 works

Wed Oct 17, 2018 7:32 am

I have openvpn client on my Pi and my Pi is set as a gateway on my network.

When I have 'dev tun' or 'dev tun0' in the client.conf, everything works fine. Accessing it as a gateway works fine and I can get to every remote site as expected.

However, if i put 'dev tun1' in the client.conf, it still connects to the remote server, but I cannot access anything remote from my pc using it as a gateway. That's the only change.

If I SSH into my Pi OpenVPN client, I can access web sites like google.com, whatsmyip.co, etc. with wget and the results are correct. So the Pi is connected via OpenVPN on tun1 to the OpenVPN Server and it is getting to everything properly.

But my PC connected to the Pi as a gateway just times out with 'web page took too long to respond'

The reason I'm wanting to do this is because I have multiple OpenVPN Servers I wish to connect simultaneously to from my Pi OpenVPN client by having multiple *.conf files in /etc/openvpn and running OpenVPN as a daemon, so that if one Service goes dark, it'll still be connected via another one.

Any idea?
Thanks!!!

User avatar
XueHai8
Posts: 27
Joined: Mon Jul 24, 2017 12:19 pm

Re: OpenVPN Client on tun1 fails, tun0 works

Wed Oct 17, 2018 10:07 am

I think I found my answer. I needed a new entry for tun1 in /etc/iptables.up.rules
Now it seems to be working ok.

Return to “Networking and servers”