NetworkManager VPN - Routing issue


I see some strange (buggy?) behavior in NetworkManager’s handling of OpenVPN connections.

Here’s the situation: My laptop is on a wireless network, This is the normal routing table:

lars@polaris:~> sudo /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     2      0        0 wlan0       U     0      0        0 lo         UG    0      0        0 wlan0

Now, I use NetworkManager to set up an OpenVPN connection. The OpenVPN connection is using a tap interface (company policy; not negotiable). The other (VPN) network is

While communication within the VPN works as one would expect, NetworkManager always sets the tap (VPN) interface as the default route/gateway.

Thus, the routing table is now:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UGH   0      0        0 wlan0   U     0      0        0 tap0   U     2      0        0 wlan0       U     0      0        0 lo         U     0      0        0 tap0

Naturally, when I’m on a local network I want to route all traffic except that bound for IPs in the VPN through the local network.

I assumed that checking “Ignore automatically obtained routes” under the VPN Connection setting, IPV4 Settings, Routes would prevent this, but it doesn’t. Selecting “Manual” IPv4 settings and entering a manual route doesn’t work either - I still always end up with the same routing table.

Of course, one can fix the default route manually (“route add …”) after connecting to the VPN, but this feels like a terrible hack.

I’m on OpenSUSE 11.1, btw, with a fully up-to date system.

Does anyone have a suggestion how to make this work as intended?

I am having the same issue. I was on opensuse 11.1 using gnome networkmanager and vpnc. then, it seemed that it was handling split horizons properly, now (opensuse 11.2 gnome networkmanager with vpnc) it seems to put a def route in for every connection regardless of what the vpn concentrator wants.

anyone know how to fix this?