VPN in KNetwork applet

Hi,

I upgraded from 11.2 to 11.3 without a problem. However, one of the annoying bugs in 11.2 is still in 11.3. I cannot use VPN from the KNetworkApplet. It works using another app such as Kvpnc but when I click on the configured vpn in KNetworkApplet nothing happens. Actually, I can see a text saying “activating” appearing below the vpn name and quickly disappearing. It is to fast to be a network timeout or something like that.

Any ideas will be appreciated.

heg

More info from /var/log/NetworkManager

Jul 15 09:32:08 tecra NetworkManager: <info> Starting VPN service ‘org.freedesktop.NetworkManager.vpnc’…
Jul 15 09:32:08 tecra NetworkManager: <info> VPN service ‘org.freedesktop.NetworkManager.vpnc’ started (org.freedesktop.NetworkManager.vpnc), PID 6844
Jul 15 09:32:08 tecra NetworkManager: <info> VPN service ‘org.freedesktop.NetworkManager.vpnc’ just appeared, activating connections
Jul 15 09:32:08 tecra NetworkManager: <info> VPN plugin state changed: 1
Jul 15 09:32:08 tecra NetworkManager: <info> VPN plugin state changed: 3
Jul 15 09:32:08 tecra NetworkManager: <info> VPN connection ‘VPNXXX’ (Connect) reply received.
Jul 15 09:32:08 tecra NetworkManager: <info> VPN plugin failed: 1
Jul 15 09:32:08 tecra NetworkManager: <info> VPN plugin state changed: 6
Jul 15 09:32:08 tecra NetworkManager: <info> VPN plugin state change reason: 0
Jul 15 09:32:08 tecra NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active.
Jul 15 09:32:08 tecra NetworkManager: <debug> [1279179128.896568] run_netconfig(): Spawning ‘/sbin/netconfig modify --service NetworkManager’
Jul 15 09:32:08 tecra NetworkManager: <debug> [1279179128.898594] write_to_netconfig(): Writing to netconfig: INTERFACE=‘wlan0’#012
Jul 15 09:32:08 tecra NetworkManager: <debug> [1279179128.898649] write_to_netconfig(): Writing to netconfig: DNSSERVERS=‘192.168.1.1’#012
Jul 15 09:32:08 tecra NetworkManager: <info> Clearing nscd hosts cache.
Jul 15 09:32:08 tecra NetworkManager: <info> Policy set ‘HOME’ (wlan0) as default for routing and DNS.
Jul 15 09:32:21 tecra NetworkManager: <debug> [1279179141.001421] ensure_killed(): waiting for vpn service pid 6844 to exit
Jul 15 09:32:21 tecra NetworkManager: <debug> [1279179141.001603] ensure_killed(): vpn service pid 6844 cleaned up

Very similar story here, except this was actually working OK for me in 11.2.
My /var/log/NetworkManager is showing much the same as yours.

Just out of interest, what type of VPN are you trying to connect to? In my case it’s a Microsoft pptp (at wife’s work).

Please post back here if you have any success!

Thanks, Alex

Hi again Heg.

An update for you -this is now working correctly for me, which at least indicates there is nothing fundamentally broken in my case.

Further google-fu after reading your post had me change 2 settings that did the trick -remembering that it is a pptp connection in my case:
1/ In pptpsettings/advanced, I un-checked EAP as an allowed authentication method
2/ In pptpsettings/advanced again, I checked Use MPPE Encryption (with Any as the crypto)

Of course these settings may just be what that connection requires, but they did the trick for me and given tha our logs were similar they’ll be worth a try if you are using pptp and haven’t hit that combination already.

Good luck!

Sadly, it didn’t work for me. I am connecting to a cisco vpn using vpnc. By the way, the same configuration works in kvpnc, so I think is something related with the networkmanager plugin. Thanks for the info anyway.

One other anomaly I found in the knetworkmanager config: For some reason even though there are separate fields for username and domain, I actually needed to enter “domain\username” in the username field to make it sing. I don’t know whether it’s similar for vpnc, but if relevant it could be worth a try.

For what it’s worth I’ve only had 50% success with identical setup on 2 installs -1 worked fine, but the other crashes nm every time I try to launch it.

Good luck!

I played around using “domain\username” in either username or domain field. None of this worked out but I managed to crash knetworkmanager

Application: KNetworkManager (knetworkmanager), signal: Segmentation fault
[KCrash Handler]
#6 0xb633ca04 in QAction::isSeparator() const () from /usr/lib/libQtGui.so.4
#7 0xb67dc78d in ?? () from /usr/lib/libQtGui.so.4
#8 0xb67dfb70 in QMenu::mouseMoveEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#9 0xb639df3c in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#10 0xb67e00dc in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#11 0xb6344c64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#12 0xb634d750 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0xb72bb9d1 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#14 0xb6defe0e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#15 0xb6345c4c in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#16 0xb6346185 in QApplicationPrivate::sendSyntheticEnterLeave(QWidget*) () from /usr/lib/libQtGui.so.4
#17 0xb63970c0 in QWidgetPrivate::hideChildren(bool) () from /usr/lib/libQtGui.so.4
#18 0xb6397272 in QWidgetPrivate::hide_helper() () from /usr/lib/libQtGui.so.4
#19 0xb639d8c8 in QWidget::setVisible(bool) () from /usr/lib/libQtGui.so.4
#20 0xb63a460d in QWidgetAction::releaseWidget(QWidget*) () from /usr/lib/libQtGui.so.4
#21 0xb67da6c9 in QMenu::actionEvent(QActionEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb639e426 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb67e00dc in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#24 0xb6344c64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb634cca4 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0xb72bb9d1 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0xb6defe0e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#28 0xb6395b35 in QWidget::removeAction(QAction*) () from /usr/lib/libQtGui.so.4
#29 0x08057ce3 in _start ()

I will install the debug symbols and report it.

Hi again.

-Sounds like we’ve got similar setups: on my second machine I have also crashed knetworkmanager repeatedly but having trouble getting debug symbols installed.

What I have found does work very reliably on this machine is to use the cnetworkmanager command line client for the vpn connection.

This script:

#!/bin/bash
cnetworkmanager --activate-connection=user,'VPN_NAME',wlan0,&
sleep 5
krdc --fullscreen rdp://username@192.168.111.111

seems to connect the vpn very robustly, and the 5 second timeout is OK before launching kdrc.
(I will be fixing it to actually check for connection success before krdc).
It works nicely - I have put a single button on the panel for the wife to connect to her work, don’t need to run as root, and no ‘do this, wait for that, then do this’

Just for the record: My vpn works fine when I use kvpnc. The connection icon in the knetworkapplet is not working. But thanks anyway.

Agreed, knetworkapplet is flaky re vpn, as both our experiences show we can connect pvn through other means fine.
-Out of interest can you run kvpnc as user? -It’s always prompted me to run as root, which is not ideal.

I always need to run kvpnc as a root. It is far from ideal. Let’s hope that they fix knetworkapplet.