Bug 1184288 - nobind/tap configuration causes openvpn-helper to exit b/c no local ip address available
Summary: nobind/tap configuration causes openvpn-helper to exit b/c no local ip addres...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openvpn
Version: 21
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-21 00:20 UTC by Bond Masuda
Modified: 2015-12-02 17:08 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 484831
Environment:
Last Closed: 2015-12-02 07:43:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bond Masuda 2015-01-21 00:20:01 UTC
+++ This bug was initially created as a clone of Bug #484831 +++

Description of problem:

My OpenVPN configuration uses a bridged VPN, so the server does not assign IP addresses: clients are treated like they were on the local network, so require a static or DHCP assigned address.  The nm-openvpn-server-openvpn-helper application looks for the ifconfig_local environment variable, and when it finds none is provided, exits.

Version-Release number of selected component (if applicable):

NetworkManager-openvpn-0.7.0-18.svn11.fc10.i386

How reproducible:

Use a bridged OpenVPN configuration

Steps to Reproduce:

Configure the client and try to open the connection.
  
Actual results:
In /var/log/messages, one sees:

Feb  9 22:30:42 eepc1k nm-openvpn[2965]: LZO compression initialized
Feb  9 22:30:42 eepc1k nm-openvpn[2965]: UDPv4 link local: [undef]
Feb  9 22:30:42 eepc1k nm-openvpn[2965]: UDPv4 link remote: 10.0.67.2:1194
Feb  9 22:30:42 eepc1k nm-openvpn[2965]: [vpn.az.pab] Peer Connection Initiated with 10.0.67.2:1194
Feb  9 22:30:43 eepc1k nm-openvpn[2965]: TUN/TAP device tap0 opened
Feb  9 22:30:43 eepc1k nm-openvpn[2965]: /usr/libexec/nm-openvpn-service-openvpn-helper tap0 1500 1574   init
Feb  9 22:30:43 eepc1k NetworkManager: <info>  VPN plugin failed: 2
Feb  9 22:30:43 eepc1k nm-openvpn[2965]: script failed: external program exited with error status: 1
Feb  9 22:30:43 eepc1k nm-openvpn[2965]: Exiting
Feb  9 22:30:43 eepc1k NetworkManager: <info>  VPN plugin failed: 1

The blanks where openvpn provides the local IP address and netmask would go are an indication, but not cause, of the problem.

Expected results:

Feb  9 23:19:34 eepc1k nm-openvpn[2818]: LZO compression initialized
Feb  9 23:19:34 eepc1k nm-openvpn[2818]: UDPv4 link local: [undef]
Feb  9 23:19:34 eepc1k nm-openvpn[2818]: UDPv4 link remote: 10.0.67.2:1194
Feb  9 23:19:34 eepc1k nm-openvpn[2818]: [vpn.az.pab] Peer Connection Initiated with 10.0.67.2:1194
Feb  9 23:19:35 eepc1k nm-openvpn[2818]: TUN/TAP device tap0 opened
Feb  9 23:19:35 eepc1k nm-openvpn[2818]: /usr/libexec/nm-openvpn-service-openvpn-helper tap0 1500 1574   init
Feb  9 23:19:35 eepc1k NetworkManager: nm_device_ethernet_new: assertion `driver != NULL' failed
Feb  9 23:19:35 eepc1k NetworkManager: <info>  VPN connection 'az.pab' (IP Config Get) reply received.
Feb  9 23:19:35 eepc1k NetworkManager: <info>  VPN Gateway: 10.0.67.2

(Well, the assertion failure isn't expected, but it doesn't interfere with the connection.)

Additional info:

I worked around the problem by replacing the real program in /usr/libexec/nm-openvpn-service-openvpn-helper with a shell script wrapper that sets the ifconfig_local environment variable to an appropriate value before exec'ing the real program.  What I would expect is that the system would detect absence of an assigned IP address and perform a DHCP lookup like it does any other time it finds itself connected to a new network.

--- Additional comment from Christoph Höger on 2009-02-10 04:34:53 EST ---

Hi Peter,

thank you for your bugreport,

could you please post the (complete) list of parameters, openvpn is started with?

regards

Christoph

--- Additional comment from Peter A. Bigot on 2009-02-10 08:27:22 EST ---

The client side is invoked by NeworkManager-openvpn with these parameters, inferred from wherever it hides what I put into the GUI:

ARGS:  --remote 10.0.67.2 --comp-lzo --nobind --dev tap --proto udp --port 1194 
--tls-auth /etc/openvpn/keys/ta.key 1 --syslog nm-openvpn --script-security 2 --
up /usr/libexec/nm-openvpn-service-openvpn-helper --up-restart --persist-key --p
ersist-tun --management 127.0.0.1 1194 --management-query-passwords --route-noex
ec --client --ca /etc/openvpn/keys/server-chain.pem --cert /etc/openvpn/keys/net
book.az.vpn.pem --key /etc/openvpn/keys/netbook.az.vpn.key

The server doesn't use NetworkManager, and has a configuration with these options:

local 10.0.67.2
proto udp
port 1194
dev tap0
ca keys/vpn-client-chain.pem
cert keys/server.az.vpn.pem
key keys/server.az.vpn.key
tls-auth keys/ta.key 0
dh keys/dh1024.pem
mode server
tls-server
ifconfig-pool 192.168.67.64 192.168.67.95
push "route-gateway 192.168.67.1"
keepalive 10 120
comp-lzo
max-clients 5
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
;log         openvpn.log
;log-append  openvpn.log
verb 4
mute 10

--- Additional comment from Need Real Name on 2009-03-04 20:39:33 EST ---

I am having the same problem.  Could you please post your "workaround" script?  I see this is set to low priority, so it is not likely to be fixed any time soon.

--- Additional comment from Peter A. Bigot on 2009-03-04 22:25:03 EST ---

It's something like this:

cd /usr/libexec
mv nm-openvpn-service-openvpn-helper nm-openvpn-service-openvpn-helper.real
cat >nm-openvpn-service-openvpn-helper.sh <<EOScript
#!/bin/sh
ifconfig_local=192.168.0.2
export ifconfig_local
exec /usr/libexec/nm-openvpn-service-openvpn-helper.real "${@}"
EOScript
ln -s nm-openvpn-service-openvpn-helper nm-openvpn-service-openvpn-helper.sh

--- Additional comment from Peter A. Bigot on 2009-03-04 22:26:29 EST ---

Though the ln command at the end has its arguments wrong way round.

--- Additional comment from Bug Zapper on 2009-11-18 04:49:56 EST ---


This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

--- Additional comment from SteveB on 2009-11-20 06:14:15 EST ---

I have this same bug in FC12.
Should I file a new bug, or can someone change this to FC12?

NetworkManager-0.7.996-6.git20091021.fc12.i686
NetworkManager-openvpn-0.7.996-4.git20090923.fc12.i686

Nov 20 05:05:55 music nm-openvpn[2473]: /usr/libexec/nm-openvpn-service-openvpn-helper tap0 1500 1576   init
Nov 20 05:05:55 music NetworkManager: <info>  VPN plugin failed: 2
Nov 20 05:05:55 music nm-openvpn[2473]: script failed: external program exited with error status: 1

Also --
the workaround I've used in the past is to set up the tap
interface like a "real" interface, with a ifcfg-tap0 script,
and use the /sbin/ifup-pre-local script to start OpenVPN:
  if <interface> == tap0 then
       openvpn --config <your config>
  endif

NetworkManager treats tap0 like a "real" interface, That way, tap0 gets configured at startup just like any other interface -- in particular, via
DHCP

--- Additional comment from Bug Zapper on 2009-12-18 02:52:29 EST ---


Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from Suren Karapetyan on 2013-02-21 14:51:09 EST ---

I still have the problem with Fedora 18.
The workaround in comment 4 is working.

--- Additional comment from Fedora End Of Life on 2013-12-21 09:51:17 EST ---

This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Fedora End Of Life on 2014-02-05 17:38:34 EST ---

Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from  on 2015-01-16 05:25:58 EST ---

This problem still exists in Fedora 20 and 21. Can this be re-opened and properly addressed? The workaround mentioned in comment #4 is not sustainable (changes to nm-openvpn-service-openvpn-helper are overwritten from updates).

Without the ability for OpenVPN to obtain IP configuration via DHCP severely hinder's interoperability with many VPN capable router home appliances where users do not have the convenience of "reconfiguring" the VPN server side. Google searches reveal that this affects many people for several years now. Would it be possible that priority on this be raised?

Comment 1 Fedora Admin XMLRPC Client 2015-10-14 14:47:58 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Fedora End Of Life 2015-11-04 10:08:20 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2015-12-02 07:43:27 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.