[intrepid] nm-openvpn does not set default gw

Bug #271547 reported by Michael Flaig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager-openvpn (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: network-manager-openvpn

When I connect to my Openvpn server, setting the default gw fails
push "redirect-gateway" is set on the vpn server

Of course this worked before :-)

Here is the log of my attempt on intrepid:
Sep 18 00:50:23 voyager nm-openvpn[11140]: /usr/lib/network-manager-openvpn/nm-openvpn-service-openvpn-helper tun0 1500 1558 10.30.51.110 10.30.51.1 init
Sep 18 00:50:23 voyager NetworkManager: <info> VPN connection 'akira-mfl' (IP Config Get) reply received.
Sep 18 00:50:23 voyager NetworkManager: <info> VPN Gateway: 10.30.50.10
Sep 18 00:50:23 voyager NetworkManager: <info> Tunnel Device: tun0
Sep 18 00:50:23 voyager NetworkManager: <info> Internal IP4 Address: 10.30.51.110
Sep 18 00:50:23 voyager NetworkManager: <info> Internal IP4 Prefix: 24
Sep 18 00:50:23 voyager NetworkManager: <info> Internal IP4 Point-to-Point Address: 10.30.51.1
Sep 18 00:50:23 voyager NetworkManager: <info> Maximum Segment Size (MSS): 0
Sep 18 00:50:23 voyager NetworkManager: <info> Static Route: 10.30.51.0/24 Next Hop: 10.30.51.1
Sep 18 00:50:23 voyager NetworkManager: <info> DNS Domain: '(none)'
Sep 18 00:50:23 voyager NetworkManager: <info> Login Banner:
Sep 18 00:50:23 voyager NetworkManager: <info> -----------------------------------------
Sep 18 00:50:23 voyager NetworkManager: <info> (null)
Sep 18 00:50:23 voyager NetworkManager: <info> -----------------------------------------
Sep 18 00:50:23 voyager NetworkManager: <info> (tun0): removing resolv.conf from /sbin/resolvconf
Sep 18 00:50:23 voyager nm-openvpn[11140]: Initialization Sequence Completed
Sep 18 00:50:23 voyager NetworkManager: <info> Clearing nscd hosts cache.
Sep 18 00:50:23 voyager NetworkManager: <info> VPN connection 'akira-mfl' (IP Config Get) complete.
Sep 18 00:50:23 voyager NetworkManager: <info> VPN plugin state changed: 4
Sep 18 00:50:23 voyager nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/01ifupdown' exited with error status 1.

This is over wifi, where the wifi does not submit a default gateway, but the openvpn server does.

ip route after connect:
10.30.50.0/24 dev wlan0 proto kernel scope link src 10.30.50.110
10.30.51.0/24 via 10.30.51.1 dev tun0 proto static
10.30.51.0/24 dev tun0 proto kernel scope link src 10.30.51.110
192.168.122.0/24 dev vnet0 proto kernel scope link src 192.168.122.1

Package List:
ii network-manager 0.7~~svn20080908t183521+eni0-0ubuntu3
ii network-manager-gnome 0.7~~svn20080907t033843-0ubuntu2
ii network-manager-openvpn 0.7~~svn20080908t183521a-0ubuntu2

Revision history for this message
Michael Flaig (mflaig) wrote :

I did some thinking about this:
This seems to be a problem on my end: redirect-gateway can only work if the system already has a gateway (as it seems) since the problem also accurs when using plain openvpn.

Reported behaviour is OK and to be expected.

Revision history for this message
Michael Flaig (mflaig) wrote :

If there is no default gateway set for the network connection, "redirect-gateway" does not work. This is to be expected. pushing a default route in this case should work, though.

Changed in network-manager-openvpn:
assignee: nobody → mflaig
status: New → Invalid
Revision history for this message
Michael Flaig (mflaig) wrote :

Reopened as new, Problem also existed when a default gateway is delivered by the default gateway

Changed in network-manager-openvpn:
assignee: mflaig → nobody
status: Invalid → New
Revision history for this message
Michael Flaig (mflaig) wrote :

So I assumed previously that the redirect gateway does not work because of the fact that I did not deliver a default gateway via dhcp. Well this is right.

However: I added a default gateway to dhcp server configuration and tested again

Test 1: Openvpn (started via init script)
  Openvpn did set the default gateway to the vpn servers address -> correct

Test2: Network Manager Openvpn
  network-manager-openvpn did not set the default route
  There was still the default gateway set, which the dhcp server delivered -> wrong

So the bug is there and redirect-gateway option is not interpreted by nm-openvpn correctly

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.