Bug 214557 - Unable to configure vpn routing from within KNetworkManager
Summary: Unable to configure vpn routing from within KNetworkManager
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.9
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-14 19:12 UTC by Benoni Hamilton
Modified: 2011-06-10 21:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benoni Hamilton 2009-11-14 19:12:15 UTC
Version:           0.9 (using KDE 4.3.1)
OS:                Linux
Installed from:    openSUSE RPMs

When creating or editing a VPN connection from within KNetworkManager, it isn't possible to set routing rules.  From the 'IP Address' tab, you can select 'Routes' from the drop-down menu at the bottom right.  With this you can ignore automatically set rules and control setting of the default route, the latter of which works correctly, the former I haven't tested.  However, there should be a way to enter specific routes.  Otherwise, if the VPN server doesn't set automatic routes, you can only route all traffic, or no traffic down the tunnel.

The only way around this is to configure routing with 'route' after connecting the VPN, but that sucks.

I can set the connection up correctly in nm-applet (which is what I've used in the past, even in KDE, but the current version of KNetworkManager is sooo sweet I really don't want to use nm-applet :-)

Cheers,

Benoni
Comment 1 Benoni Hamilton 2009-11-14 19:17:52 UTC
Sorry, poor skills on forgetting earlier.  Further details:

This issue appears to apply to both vpnc and openvpn connections, though I only use vpnc.

I tried to edit the configuration files manually, adding what I can only guess was the correct routing string, eg, "xxx.xxx.xxx.xxx/xx".  When starting the vpnc connection this was removed and the timestamp changed.
Comment 2 Will Stephenson 2009-11-15 22:26:37 UTC
I haven't had time to implement it yet
Comment 3 JR 2010-03-29 16:10:35 UTC
Merely having the option to automatically assign the default route to the tunnel interface would go a long way, but obviously more fine-grained control would be even lovelier. :3

I'm currently connecting to my VPN service (the Swedish anonine.net) via the network management plasma widget on this machine running Kubuntu lucid. The package version is 0.9~svn1102346-0ubuntu1~ppa4. The service uses the PPTP plugin and connects nicely, although there were no error messages to tell me what I had set up wrong when initially adding the connection.

After connecting I manually change the default route in a terminal.

  $ sudo route del -net default dev wlan0
  $ sudo route add -net default dev ppp0

And obviously the reverse when disconnecting the VPN connection.

Keep up the good work. I really appreciate not having to boot up KVpnc (with root permissions) just to set up the VPN. :)
Comment 4 Lamarque V. Souza 2011-03-28 19:24:56 UTC
This seems fixed in the latest snapshot, can you check it?
Comment 5 Benoni Hamilton 2011-06-10 08:56:42 UTC
Sorry it's taken so long to get around to checking it.  I took the newest package I could find but it was kinda messed up.  I could see the new configuration options, but it crashed when I tried to save the changes, then I noticed that I cannot actually set the VPN options themselves.

I'll install from source and see what happens.
Comment 6 Lamarque V. Souza 2011-06-10 09:17:07 UTC
(In reply to comment #5)
> Sorry it's taken so long to get around to checking it.  I took the newest
> package I could find but it was kinda messed up.  I could see the new
> configuration options, but it crashed when I tried to save the changes, then I
> noticed that I cannot actually set the VPN options themselves.
> 
> I'll install from source and see what happens.

I fixed a crash when editing IPv4 settings last May 25th. The crashed happened when you added a route but left the metric empty. If you added the metric it did not crash. You can try adding a metric for your route (0 for instance), it will probably work until you upgrade to version that has that fixed.

My fix also fixed other crashes in IPv4 setting, you have better upgrade to a newer version or comple from source.
Comment 7 Benoni Hamilton 2011-06-10 13:27:44 UTC
Yep, tested and everything's working as expected.  Leave you to mark it as fixed.

Really like the way things are looking in there.  Thanks for the hard work.

Benoni