Results 1 to 5 of 5

Thread: Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

  1. #1
    Join Date
    Apr 2013
    Beans
    48

    Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

    I've found some stuff about similar issues on the web. But, that recommended fix is not working for me.

    Basically, if I log in to and out of one vpn then when I try to log in to another vpn I get an invalid secrets error and can't log in to any other vpn until I reboot. Wash, rinse, repeat.

    I made the policy change, but it had no effect.

    Some folks claim that restarting the network manager between connection attempts will do the trick. But, that's not working for me either.

    I tried restarting the openvpn service; that did not work.

    I also tried stopping openvpn, restarting network-manager and starting openvpn. That also did not work.

    I'm stuck and it is a total pain in the neck to have to reboot my system just to change vpn's.

    Suggestions greatly appreciated.
    Last edited by somethingcatchy; April 6th, 2013 at 04:30 PM.

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

    Try disabling then enabling networking using the Network Manager.

    I have a program that uses a 3G USB stick that requires this because it does not reset everything when it exits, but the restart fixes everything.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    Apr 2013
    Beans
    48

    Re: Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

    Thanks for the suggestion. It didn't quite do it all, but it put me on the right track and with some tinkering this is the recipe that I have so far to work around it:

    To change VPN's

    Disconnect from VPN in GUI through network manager in system tray.

    Right click network icon in system tray / Disable networking in the GUI

    Enter the following commands in the terminal one at a time in this order:
    Code:
    sudo service openvpn stop
    sudo service network-manager stop
    sudo service openvpn start
    sudo service network-manager start
    Right click network icon in system tray / Enable networking in the GUI

    Reconnect to a different VPN in GUI through network manager in system tray.

    And I can swap VPN's without a reboot.

    I'm off to bed. I'll dig in to it more tomorrow. I need to find out what the cli equivalent for "Right click network icon...", yada, yada is. If someone wants to be a pal, save me some googles and drop me the line that would be super awesome.

    I'll put it all in a short script and drop it on my desktop so that I can automagicalize the process and just double click the script.

    Once I verify it works as intended I'll come back, write up the full recipe for the script and mark as solved so the next person can copy / paste, do a click or two and be done.

    Thanks for the help.
    Last edited by somethingcatchy; April 6th, 2013 at 09:57 AM.

  4. #4
    Join Date
    Apr 2013
    Beans
    48

    Re: Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

    I think I'm going to stick to the recipe above and mark this as solved.

    I found:

    Code:
    nmcli nm enable false
    and

    Code:
    nmcli nm enable true
    to toggle networking on and off from the TTY.

    But when I manually entered the following one at a time:

    Code:
    nmcli nm enable false
    sudo service openvpn stop
    sudo service network-manager stop
    sudo service openvpn start
    sudo service network-manager start
    nmcli nm enable true
    while testing to work towards a script, my network manager became unstable and I could not restart networking from the GUI or the CLI. I also could not restablish a network connection until I had rebooted twice.

    That being the case, even though the original recipe above is clunky it seems to be the best option at the moment.

  5. #5
    Join Date
    Apr 2013
    Beans
    48

    Re: Bug(?) 12.04 network-manager / openvpn (plugin?) = have to reboot to change vpn's

    Just a note for anybody who finds this on google:

    This solution is better than nothing. But it is far from 100%; more like ~90%. In other words it works about 9 out of 10 times; the other time you still have to reboot to swap VPN's.

    From what I've read network-manager is very buggy in general.

    Unfortunately wicd lacks too may basic features; like a VPN management console. They're supposed to get such things at an unknown point in the future.

    I can tell you from experience that connection manager (connman) has even more bugs than network-manager.

    And that's the only three I know of.

    A lot of this is supposedly fixed in 12.10 in the new version of network manager.

    I tried to install that version of network-manager from 12.10 in to my wife's machine also running 12.04 and blew up her whole networking framework.

    Hopefully the devs will backport the new version of network manager ASAP!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •