Summary: | VPN PPTP support | ||
---|---|---|---|
Product: | [Unmaintained] Network Management | Reporter: | Daniel <gardak> |
Component: | Control Module | Assignee: | Will Stephenson <wstephenson> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | a.horsfield, apavelm, dima, gapon007, kde, lamarque, listuser, mindboosternoori, roberto.braga, victorjss |
Priority: | NOR | ||
Version: | 0.7 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
main dialog for editing pptp-vpn connection
VPN connection options dialog vpn routes settings dialog Patch. Implementation of readConfig(), writeConfig(), readSecrets() functions. screen shot with Log |
Description
Daniel
2008-11-06 15:54:33 UTC
*** This bug has been confirmed by popular vote. *** It's on the todo list... Any progress here, please? Thanks a lot. This is actually a regression comparing to knetworkmanager for KDE 3 (more details at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531577 ), so can you please the severity of this issue? Best regards, -- Marado Not relevant for me any more, but it's the same issue with the plasma-widget. I was thinking to see the pptp support with 4.3 release, is there any hope to see it in 4.3.1? I see that is in the to-do list since february but which is the satus of the work? I'm not working on it and it's a low priority for me. I will advise if anyone else wants to do it, it's just some basic UI programming. I can help with UI (*. ui files), if it necessary. If you release simple programming part to bind UI with functional component. Created attachment 36024 [details]
main dialog for editing pptp-vpn connection
Created attachment 36025 [details]
VPN connection options dialog
secondary dialog which calls on button Preferences in "VPN" tab
Created attachment 36026 [details]
vpn routes settings dialog
secondary dialog which allows to setup routing table
UI files in attachment. SVN commit 1010553 by wstephens: Add skeleton PPTP plugin implementation using contributed UI files. Now you need to implement the readConfig(), writeConfig() and readSecrets() methods. Use the other VPN plugins as a guide. CCBUG: 174439 M +1 -0 CMakeLists.txt A pptp (directory) vpnc#1010269 M +8 -8 pptp/CMakeLists.txt A pptp/networkmanagement_pptpui.desktop vpnc/networkmanagement_vpncui.desktop#1010269 D pptp/networkmanagement_vpncui.desktop A pptp/nm-pptp-service.h [License: GPL (v2+)] D pptp/nm-vpnc-service.h A pptp/pptp.cpp vpnc/vpnc.cpp#1010269 [License: GPL (v2/3)] A pptp/pptp.h vpnc/vpnc.h#1010269 [License: GPL (v2/3)] A pptp/pptpadvanced.ui A pptp/pptpauth.ui vpnc/vpncauth.ui#1010269 A pptp/pptpprop.ui vpnc/vpncprop.ui#1010269 A pptp/pptpwidget.cpp vpnc/vpncwidget.cpp#1010269 [License: GPL (v2/3)] A pptp/pptpwidget.h vpnc/vpncwidget.h#1010269 [License: GPL (v2/3)] D pptp/vpnc.cpp D pptp/vpnc.h D pptp/vpncauth.ui D pptp/vpncprop.ui D pptp/vpncwidget.cpp D pptp/vpncwidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1010553 BTW I tweaked the UI files to use the elements that I need. Some are already present elsewhere in NM and reused. Created attachment 36134 [details]
Patch. Implementation of readConfig(), writeConfig(), readSecrets() functions.
I implement those 3 functions, but I'm not sure, that I correctly understood mechanism of MPPE switch. Please check it.
Look the code in comment block, by keyword "LOOK:" (case sensitive), cause I realy don't know, if option not used it necessary to store it with "no" value, or not?
Oops! In this block: // LOOK: I don't know if it needed. /* else { data.insert(NM_PPTP_KEY_LCP_ECHO_FAILURE, "5"); data.insert(NM_PPTP_KEY_LCP_ECHO_INTERVAL, "30"); } */ change 5 and 30 integers to 0 and 0. P.S. Sorry for my English. SVN commit 1011013 by wstephens: commit another excellent patch by Pavel Andreev <apavelm@gmail.com> for PPTP support loading saving. I had to adapt the way advanced widgets are referenced to go with what was committed yesterday. Also the LOOK blocks that were queried should be unnecessary, NM generally accepts a missing key as the default value. Does the plugin work now? I will add the IPV4 settings page and check the MPPE settings tomorrow. CCBUG:174439 M +3 -0 pptpprop.ui M +159 -2 pptpwidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1011013 I suppose, that some UI modifications is necessary to do. Such as, wnen cb_MPPE is set to "unchecked" other MPPE elements below must be unenabled and reseted to default value. And when it set to "checked" MPPE elements below should be enabled. Also, I think, that LCP_ECHO parameters value must be more flexible, user should be change integer values, not only "true"/"false". And if NM supports changing parameters MTU and MRU - make a way to make possible to change it. Question: this plugin will be included only on KDE 4.4, or it also be included in KDE 4.3.* branch? KNetworkManager is not part of the KDE release cycle yet so it can be built with and shipped vs 4.3 already. You should look at the source of the NetworkManager-pptp-gnome code to see if it sends MTU and MRU using the vpn settings or using a separate PPP settings group (NetworkManager does define such a group, see libs/internals/settings/ppp.h but I don't know if PPTP has its own copies of MTU and MRU). I haven't seen libs/internals/settings/ppp.h but I have seen NetworkManager-pptp-gnome. Their plugin doesn't support MTU or MRU change, but the pptp via pon/poff scripts does. I supposed, that this plugin is assigned for plasma plugin network management, not for knetworkmanager, isn't it? It's assigned to Network Management which is shared between knetworkmanager (KDE4) and the plasmoid. 2 Will Stephenson: today I update my KDE (with PPTP support), but when I try to activate VPN connection - nothing happens. Absolutely nothing. Is it a bug of plasma-widget-networkmanagment or our plugin? Have you test this plugin, and what result you had? *** Bug 205079 has been marked as a duplicate of this bug. *** Pavel: No, I don't have access to a PPTP VPN to test this. Can you attach the NetworkManager logs from when KNetworkManager is started up with a PPTP vpn conneciton configured, and compare the connection with a working one from nm-applet on DBUS as described here? http://userbase.kde.org/NetworkManagement#It.27s_All_KDE.27s_Fault.21 Created attachment 36573 [details]
screen shot with Log
I connect to my local Wifi. And then try to connect to my PPTP VPN connection HDS or HDS2 (thats same).
Log:
Aug 30 21:29:04 irq-laptop NetworkManager: <info> (eth1): writing resolv.conf to /sbin/resolvconf
Aug 30 21:29:14 irq-laptop NetworkManager: <info> (eth1): device state change: 7 -> 8 (reason 0)
Aug 30 21:29:14 irq-laptop NetworkManager: <info> (eth1): writing resolv.conf to /sbin/resolvconf
Aug 30 21:29:14 irq-laptop NetworkManager: <info> Policy set 'IrQ-WiFi' (eth1) as default for routing and DNS.
Aug 30 21:29:14 irq-laptop NetworkManager: <info> Activation (eth1) successful, device activated.
Aug 30 21:29:14 irq-laptop NetworkManager: <info> Activation (eth1) Stage 5 of 5 (IP Configure Commit) complete.
Aug 30 21:29:21 irq-laptop ntpdate[3704]: no server suitable for synchronization found
Aug 30 21:29:38 irq-laptop wpa_supplicant[2914]: CTRL-EVENT-SCAN-RESULTS
Aug 30 21:30:18 irq-laptop wpa_supplicant[2914]: CTRL-EVENT-SCAN-RESULTS
Aug 30 21:31:18 irq-laptop wpa_supplicant[2914]: CTRL-EVENT-SCAN-RESULTS
After click on menuItem after some timeout (not on screenshot) next strings were added.
Aug 30 21:32:12 irq-laptop NetworkManager: <WARN> wait_for_connection_expired(): Connection (2) /org/freedesktop/NetworkManagerSettings/15 failed to activate (timeout): (0) Connection was not provided by any settings service
Aug 30 21:32:34 irq-laptop NetworkManager: <WARN> wait_for_connection_expired(): Connection (2) /org/freedesktop/NetworkManagerSettings/15 failed to activate (timeout): (0) Connection was not provided by any settings service
Aug 30 21:32:38 irq-laptop wpa_supplicant[2914]: CTRL-EVENT-SCAN-RESULTS
In thats log after creating new PPTP VPN connection: Aug 30 21:41:15 irq-laptop NetworkManager: <WARN> user_connection_get_settings_cb(): user_connection_get_settings_cb: Invalid connection: 'NMSettingVPN' / 'user-name' invalid: 1 Ok, show me the connection with qdbus as explained at the link in comment #25 - i need to know what user-name contains (or not). If you can compare with nm-applet so much the better. Where I can look for it (DBUS log)? username contains only latin symbols and digits. Like this (quoted from http://userbase.kde.org/NetworkManagement#It.27s_All_KDE.27s_Fault.21) " You should now try to figure out how the connection provided by Network Management differs from that provided by the other client. If you build Network Management from source you can use the tool 'qdbusfornm', which is a version of qdbus extended to handle NM's data types. If you do not build from source, just replace ./qdbusfornm --system by qdbus --system --literal in the command shown below. It is a bit harder to read but should give you the same output. If you use qdbus --system --literal, please take the time to format the output so there is one key per line, similar to the qdbusfornm output below. This is easy and just takes time, so it is better for you to do this than a developer. The value 0 below identifies the connection. Change it if you have more than one until you find the relevant connection. ./qdbusfornm --system org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/0 org.freedesktop.NetworkManagerSettings.Connection.GetSettings returns here a{sa{sv}}(==802-11-wireless== band: bg mode: infrastructure security: 802-11-wireless-security ssid: opensuse-guest ==802-11-wireless-security== auth-alg: open key-mgmt: wpa-psk wep-tx-keyidx: 0 ==connection== autoconnect: true id: openSUSE type: 802-11-wireless uuid: {951cc7d9-1fa0-4525-9ab7-7199849e1b19} ==ipv4== dns-search: method: auto ) Now you should repeat using the other, working client and copy both sets of output, before attaching them securely to a bug report at bugs.kde.org. With this information we will quickly be able to implement a fix. " I used qdbusviewer to view this settings. When I try to call this method Error message box appered: "Unable to find method GetSettings on path /org/freedesktop/NetworkManagerSettings/1 in interface org.freedesktop.NetworkManagerSettings.Connection" DONT READ PREVIOUS MESSAGE! // For WiFi qdbus --literal --system org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/0 org.freedesktop.NetworkManagerSettings.Connection.GetSettings [Argument: a{sa{sv}} {"802-11-wireless" = [Argument: a{sv} { "mode" = [Variant(QString): "infrastructure"], "seen-bssids" = [Variant(QStringList): {"00:21:XX:XX:XX:XX"}], "ssid" = [Variant(QByteArray): {73, 114, 81, 45, 87, 105, 70, 105}]}], "connection" = [Argument: a{sv} { "autoconnect" = [Variant(bool): false], "id" = [Variant(QString): "My-WiFi"], "timestamp" = [Variant(uint): 1251723964], "type" = [Variant(QString): "802-11-wireless"], "uuid" = [Variant(QString): "abccc8f1-1ef1-467d-b6db-641dcb878652"]}]}] //For VPPN qdbus --literal --system org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/1 org.freedesktop.NetworkManagerSettings.Connection.GetSettings [Argument: a{sa{sv}} {"connection" = [Argument: a{sv} { "autoconnect" = [Variant(bool): false], "id" = [Variant(QString): "VPN connection name"], "type" = [Variant(QString): "vpn"], "uuid" = [Variant(QString): "3d749648-3a5f-4e4c-a9da-a180fea34369"]}], "vpn" = [Argument: a{sv} {"data" = [Variant: [Argument: a{ss} { "domain" = "", "gateway" = "vpn.lan", "no-vj-comp" = "no", "nobsdcomp" = "yes", "nodeflate" = "yes", "refuse-chap" = "no", "refuse-eap" = "yes", "refuse-mschap" = "no", "refuse-mschapv2" = "no", "refuse-pap" = "yes", "user" = "pppmylogin"}]], "secrets" = [Variant: [Argument: a{ss} {}]], "service-type" = [Variant(QString): "org.freedesktop.NetworkManager.pptp"], "user-name" = [Variant(QString): ""]}]}] DONT READ PREVIOUS MESSAGE! // For WiFi qdbus --literal --system org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/0 org.freedesktop.NetworkManagerSettings.Connection.GetSettings [Argument: a{sa{sv}} {"802-11-wireless" = [Argument: a{sv} { "mode" = [Variant(QString): "infrastructure"], "seen-bssids" = [Variant(QStringList): {"00:21:XX:XX:XX:XX"}], "ssid" = [Variant(QByteArray): {73, 114, 81, 45, 87, 105, 70, 105}]}], "connection" = [Argument: a{sv} { "autoconnect" = [Variant(bool): false], "id" = [Variant(QString): "My-WiFi"], "timestamp" = [Variant(uint): 1251723964], "type" = [Variant(QString): "802-11-wireless"], "uuid" = [Variant(QString): "abccc8f1-1ef1-467d-b6db-641dcb878652"]}]}] //For VPPN qdbus --literal --system org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/1 org.freedesktop.NetworkManagerSettings.Connection.GetSettings [Argument: a{sa{sv}} {"connection" = [Argument: a{sv} { "autoconnect" = [Variant(bool): false], "id" = [Variant(QString): "VPN connection name"], "type" = [Variant(QString): "vpn"], "uuid" = [Variant(QString): "3d749648-3a5f-4e4c-a9da-a180fea34369"]}], "vpn" = [Argument: a{sv} {"data" = [Variant: [Argument: a{ss} { "domain" = "", "gateway" = "vpn.lan", "no-vj-comp" = "no", "nobsdcomp" = "yes", "nodeflate" = "yes", "refuse-chap" = "no", "refuse-eap" = "yes", "refuse-mschap" = "no", "refuse-mschapv2" = "no", "refuse-pap" = "yes", "user" = "pppmylogin"}]], "secrets" = [Variant: [Argument: a{ss} {}]], "service-type" = [Variant(QString): "org.freedesktop.NetworkManager.pptp"], "user-name" = [Variant(QString): ""]}]}] any variants, what the reason? 1)I tried same settings in gnome-NM-pptp and in KDE. In kde dbus output: "domain" = "", "gateway" = "<vpn-gateway>", "no-vj-comp" = "no", "nobsdcomp" = "yes", "nodeflate" = "yes", "refuse-chap" = "no", "refuse-eap" = "yes", "refuse-mschap" = "no", "refuse-mschapv2" = "no", "refuse-pap" = "yes", "user" = "<login>" In gnome dbus output: "refuse-eap" = "yes", "refuse-pap" = "yes", "nodeflate" = "yes", "gateway" = "<vpn-gateway>", "user" = "<login>", "nobsdcomp" = "yes" Settings are: only chap, mschap, mschapv2 and 'use tcp-headers compression'checked. In gnome it works, and in KDE doesn't. 2) By the way, I found second bug in KDE (our) applet. First, ONLY "USE MPPE" checkbox checked with "ANY" combobox value, dbus output: "require-mppe" = "yes", "require-mppe-128" = "yes", "require-mppe-40" = "yes" Second, change combobox value to 128 bit: "require-mppe-128" = "yes", "require-mppe-40" = "yes" As you can see mppe-40 is still turned on. SVN commit 1028542 by wstephens: 1) Fix missing break statements in switch causing all mppe options to be sent 2) Don't send 'no' values for flags, just don't put them in the data 3) Simplify reading/writing of flags, use a single QString to compare to 4) Fix language used in the UI 5) Use a QGroupBox for MPPE dependent options so these are disabled when MPPE is disabled 6) Use QAbstractButton::isChecked() instead of QCheckBox::checkState() for better readability; checkState is only needed with tristate checkboxes 7) Use buddies and accelerators for UI labels. I recreated the PPTP connection Pavel describes in Comment #35 and it now appears the same as the described nm-applet connection - let me know if it works now. CCBUG: 174439 M +81 -85 pptpadvanced.ui M +29 -6 pptpprop.ui M +61 -39 pptpwidget.cpp M +1 -0 pptpwidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1028542 it works! It seems to be working now, so I think you can mark this as closed. Thanks. Using kubuntu 10.04. Network manager crashes (segmentation fault) when I try to establish a vpn connection using pptp. Unable to install debug packages through bug reporting wizard. (In reply to comment #39) > Using kubuntu 10.04. Network manager crashes (segmentation fault) when I try to > establish a vpn connection using pptp. Unable to install debug packages through > bug reporting wizard. Works with ethernet -- problem just with wireless connections. *** Bug 234672 has been marked as a duplicate of this bug. *** I will close this bug since it is about adding support to pptp, which already happened. If there is any problem with pptp support please open a new bug entry in bugs.kde.org. |