Opened 4 months ago

Last modified 6 weeks ago

#1457 assigned Bug / Defect

removig incorrect route on exit

Reported by: agowa338 Owned by: Antonio Quartulli
Priority: major Milestone:
Component: Networking Version:
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: removing deleting static route exit


I have only the following static routes set (before OpenVPN is started): dev eth0 proto kernel scope link src via dev eth0

The OpenVPN config has redirect-gateway def1 set and the Server has the IP

Now when OpenVPN connects it adds the route for the default gateway through the VPN tunnel as it should.
It also tries set /sbin/ip route add via which throws a warning with RTNETLINK answers: No such device.
This is not an issue. But once OpenVPN exits it tries to cleanup the routes and thereby deletes the wrong one. It deletes the one previously existed and that points towards the OpenVPN server. And therefore it won't be able to be restarted.

Routing table after OpenVPN exited: dev eth0 proto kernel scope link src

Change History (1)

comment:1 Changed 6 weeks ago by Gert Döring

Owner: set to Antonio Quartulli
Status: newassigned

Part of "def1" is "install a host route for the VPN server" (so it can reach the server "outside"). I think it is getting confused because it tries to find the default gateway, and fails.

The IPv6 "find gateway" code is more robust, so that might help ;-)

But besides that, it should not try to clean up a route that failed to install. Can you show a more complete log file with --verb 3, please, showing one complete openvpn run from start to route addition to end?

Which openvpn version is that (well, the log will show)?

Note: See TracTickets for help on using tickets.