0

I use a openvpn config file connect to a vpnserver successfully.
But after I ctrl + C quit openvpn, ubuntu counld not access network.
I think the route table is wrong or openvpn is not shutdown correctly, but I don't know how to deal with it. Detail is as below:

kasim@ubuntu:~$ ip route show
0.0.0.0/1 via 10.211.1.2 dev tun0
default via 192.168.1.2 dev eth0  metric 100
10.211.1.2 dev tun0  proto kernel  scope link  src 10.211.1.1
126.41.112.147 via 192.168.1.2 dev eth0
128.0.0.0/1 via 10.211.1.2 dev tun0
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.130
kasim@ubuntu:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 15121ms

kasim@ubuntu:~$ ping www.yahoo.com
PING ds-any-fp3-real.wa1.b.yahoo.com (206.190.36.45) 56(84) bytes of data.
^C
--- ds-any-fp3-real.wa1.b.yahoo.com ping statistics ---
15 packets transmitted, 0 received, 100% packet loss, time 14085ms
1

When shutting down your OpenVpn client this shoud unmount the tun0 interface and delete the routes going through it. Maybe there is an option on your client or server conf that is putting those route permanently.

In the meantime, you could try flushing your route table : ip route flush

or deleting the routes manually :

route del -net 0.0.0.0/1 gw 10.211.1.2
route del -net 128.0.0.0/1 gw 10.211.1.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.