Bug 1153315
Description
Alan Stern
2014-10-15 18:29:16 UTC
Created attachment 947289 [details]
Log messages from VPN connection attempt
This is what appeared in /var/log/messages (with PSK and password redacted) during a recent VPN connection attempt.
Hi, Alan. Thank you for your great bugreport. Unfortunately, I, as upstream developer, don't use ipsec part of plugin. ipsec was contributed before I joined this project, so, I really have no competence on it. But, if you can make a patch, I'll definitely take a look at it and will try to merge. I've got a series of six (!) patches fixing various aspects of this thing. With them in place, NetworkManager succeeds in setting up and tearing down the VPN tunnel. But the tunnel still doesn't work; I will need help to debug the underlying problem. I will attach the patches to this bug report. The first one changes a file in the libreswan package, but the others affect only nm-l2tp-service.c. Created attachment 948191 [details]
Make "ipsec setup restart" work if the service isn't already running
Patch 1: change the "ipsec setup" script. It's not entirely clear that this is the right thing to do; however there needs to be some way to (1) start the service if it isn't running and (2) restart it if it is. Currently the "start" command does (1) and the "restart" command does (2), but nothing does both.
Created attachment 948193 [details]
Add a delay after the ipsec service is started
Without this change, nm-l2tp-service tries to connect to the ipsec service before the service's daemon is fully initialized. I don't know how to determine a good length for the delay, but one second works on my system.
Created attachment 948194 [details]
Make the ipsec.secrets file not world-readable
Patch 3: This one is a no-brainer.
Created attachment 948195 [details]
Remove an unnecessary command
Patch 4: It appears from the name that the person who added cmd11 in the first place knew that it did pretty much the same thing as cmd1. There's no explanation in the code for why both are present, and it works just as well without cmd11.
Created attachment 948196 [details]
Keep track of the IPsec connections state
Patch 5: another no-brainer.
Created attachment 948197 [details]
Fix the parameters passed to the ipsec daemon
Patch 6: Without the rightprotoport parameter in particular, my server will never accept the VPN connection request.
(In reply to Alan Stern from comment #3) > I've got a series of six (!) patches fixing various aspects of this thing. > With them in place, NetworkManager succeeds in setting up and tearing down > the VPN tunnel. But the tunnel still doesn't work; I will need help to > debug the underlying problem. > > I will attach the patches to this bug report. The first one changes a file > in the libreswan package, but the others affect only nm-l2tp-service.c. Hi. I've scheduled a task to review and apply your patches in project's bug tracker there: https://github.com/seriyps/NetworkManager-l2tp/issues/25 Okay. I don't know how the upstream developers for libreswan would react to proposed patch #1 (which isn't in the right format for a source-package change anyway). They might think the way things work currently is preferable, in which case nm-l2tp-service would have to work around the problem (for example, by stopping ipsec and then starting it instead of simply doing a restart). I figured out the reason why my VPN connection didn't work even after all these changes. It turned out to be a configuration problem in the VPN server, which I was able to work around -- it has nothing to do with NetworkManager. Which is good, because it means that issue is irrelevant to this bug report. On the other hand, I haven't yet tried to investigate the selinux violations. I'll add more information about that when I have a chance. This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. 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 '20'. 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 20 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. Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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. |