Unable to establish VPN connection (vpnc)

Hello,

Many people seem to be having problems recently with VPN connections on openSUSE. That is unfortunate as it makes openSUSE look bad. I too am having problems establishing a vpn connection. I am using two systems and I am experiencing the same results on both.

  1. New installation of Leap 42.1 with Plasma5 and NetworkManager-vpnc (not Wicked) on an HP workstation with wired ethernet connection
  2. Old installation of openSUSE 13.2 with KDE 4.14 and NetworkManager-vpnc (not Wicked) on an HP laptop with wireless connection

In both cases, the results are the same.


2015-11-23T15:18:33.270622-05:00 z800 NetworkManager[952]: ** Message: vpnc started with pid 2226
2015-11-23T15:18:33.271698-05:00 z800 NetworkManager[952]: <info>  VPN connection 'XXXXXX' (Connect) reply received.
2015-11-23T15:18:33.278052-05:00 z800 NetworkManager[952]: <info>  (tun0): new Tun device (carrier: OFF, driver: 'tun', ifindex: 6)
2015-11-23T15:18:48.303141-05:00 z800 NetworkManager[952]: /usr/sbin/vpnc: no response from target
2015-11-23T15:18:48.327866-05:00 z800 NetworkManager[952]: ** (nm-vpnc-service:2222): WARNING **: vpnc exited with error code 1
2015-11-23T15:18:48.328296-05:00 z800 NetworkManager[952]: <warn>  VPN plugin failed: connect-failed (1)
2015-11-23T15:18:48.328579-05:00 z800 NetworkManager[952]: <info>  VPN plugin state changed: stopped (6)
2015-11-23T15:18:48.328827-05:00 z800 NetworkManager[952]: <info>  VPN plugin state change reason: unknown (0)
2015-11-23T15:18:48.329489-05:00 z800 NetworkManager[952]: <warn>  error disconnecting VPN: Could not process the request because no VPN connection was active.
2015-11-23T15:19:09.078329-05:00 z800 NetworkManager[952]: <info>  VPN service 'vpnc' disappeared

I have a third (corporate) machine running Windows 7 sitting next to me which works just fine using the same config and the same wireless network. I also installed Ubuntu-Gnome 14.04.03 on my HP laptop this weekend and tested NetworkManager-vpnc. It connected fine and did not generate an error.

Can anyone offer any hints as to why vpn seems to be so broken with openSUSE lately? Any ideas how to fix this?

Thanks in advance for any/all help.

/kev

Dear kev

It seems to be (at least on my laptop which is working with networkmanager too) this old bug here that was never fixed:

https://bugzilla.novell.com/show_bug.cgi?id=781692

The work around described in there helped me to get vpnc to work together with networkmanager. If you are using wicked, it work out of the box.

Kind regards,

Hans

Thank you very much Hans. That was a big help. I’ll check resolv.conf.

With respect to wicked, I don’t know how to setup vpnc using wicked, only NetworkManager. I am using Plasma5 and NM has a widget that I can use to configure the VPN. I can’t find an application to configure network connections using wicked, VPN or otherwise. Wicked seems to “just work” if you have a single network configuration. If you are like me and require a number of different network configs, NM seems to be the only option. Perhaps I am mistaken and just haven’t found the right application yet?

Thanks Hans.


kev

I am no expert in VPN. I set it up on my openSUSE-13.2 install on both my main desktop PC and my laptop PC (also with openSUSE-13.2) and with a secondary backup PC (with openSUSE-13.1) and in all cases it simply works.

So it is not broken generically with openSUSE, but clearly it does not work for your configuration.

I note when I first started to use a vpn, I asked for help (documented here: https://forums.opensuse.org/showthread.php/504041-Advices-and-or-Beginners-script-or-guide-to-getting-started-with-openSUSE-and-a-VPN?highlight=vpn) . Years of using GNU/Linux, and not just with openSUSE, has taught me that a superior approach to trying, failing,and then saying something globally fails for a distribution, it is better to research,and then ask questions, before spinning one’s wheels. I highly recommend this approach as it both saves time for all, and it reduces frustration for all.

I note when trying on openSUSE-13.2 there was a bug for vpn that was sorted using the fix in post #10 in this bug report thread: https://bugzilla.opensuse.org/show_bug.cgi?id=904511#c10

Post#21 in the thread Advices and/or Beginners script or guide to getting started with openSUSE and a VPN ? - Network/Internet - openSUSE Forums describes how I got this to work. It turns out it was incredibly easy, once I knew how. Initially I used this technique with Express VPN, but since then I have used the same technique with different VPN.

I note, now that I know the technique, this takes less than 5-minutes to setup (probably closer to 2 to 3 minutes).
.
.

Dear kev

Just comment out these three lines mentioned below in the content of the file /etc/vpnc/vpnc-script and it will work with networkmanager and wicked:


vpnc-script has a series of conditional statements, where it chooses
a strategy for how to modify resolv.conf (lines 120--140). OpenSUSE
12.2 added one additional case
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elif  -x /sbin/netconfig ]; then # tool on Suse after 11.1
MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig
RESTORERESOLVCONF=restore_resolvconf_suse_netconfig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I comment out these three lines, then /etc/resolv.conf is set up
properly. To me, this implies some sort of issue with
modify_resolvconf_suse_netconfig.

Kind regards,

Hans