You are not logged in.
So I can connect to my OpenVPN server just fine using NetworkManager. Internet traffic flows through just fine, and tests confirm that it is using the VPN and not the local network. Then after a few minutes, it just stops. The tunnel is still there, and I can freely ping the server through the VPN connection, and I can ping things on my local network, but nothing happens when I try to ping anything else. I suspect it's a problem with my routing. I ran netstat -nr 3 times, once before connecting, once after connecting while the internet worked, and once after the internet stopped working, and here are the results:
[user@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
[user@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.8.0.5 0.0.0.0 UG 0 0 0 tun0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.8.0.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
"server ip" 10.0.0.1 255.255.255.255 UGH 0 0 0 enp2s0
[user@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 tun1
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
10.8.0.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
"server ip" 10.0.0.1 255.255.255.255 UGH 0 0 0 enp2s0
Any idea what might be causing the routing tables to change?
Offline
Why do you have a second tun interface in your third output?
Have you tried to start the VPN manually with
openvpn --config [your_conf_file]
To see what kind of output you get, and whether or not the routing table get screwed after a few minutes?
Looks like a second instance is started after a while, without cleaning the first connection / routes first, and you end up with duplicate routing entries, on different interfaces.
When the connection stop working. have you tried to remove all routes using the first tun interface (tun0).
I've never used NetworkManager to manage my openvpn connection, but I guess you should have a mean to provide the configuration you set in network manager for this vpn connection?
Offline