Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strongswan: enable charon-systemd #21872

Merged
merged 1 commit into from Jan 14, 2017
Merged

Conversation

basvandijk
Copy link
Member

I have trouble getting my StrongSwan VPN to start reliably. My issue is described in detail on the StrongSwan mailing list:

https://lists.strongswan.org/pipermail/users/2017-January/010359.html

The proposed solution is to switch from the charon daemon and the ipsec tool to charon-systemd and the swanctl tool. This patch adds support for charon-systemd and makes sure that swanctl reads its configuration files from /etc/swanctl instead of from $out/etc/swanctl which is in the unmodifiable nix store.

I hope to add a subsequent patch with a corresponding NixOS module.

Also see: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd

It would be really ideal if this and the last two commits on strongswan/default.nix ( namely: c38b4da and 9c61571) could be merged in release-16.09.

@mention-bot
Copy link

@basvandijk, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FPtje, @ip1981 and @zimbatm to be potential reviewers.

@ip1981
Copy link
Contributor

ip1981 commented Jan 14, 2017

Please find real reason :) Until then you can override strongswan for your deployment.

@FPtje
Copy link
Contributor

FPtje commented Jan 14, 2017

@ip1981 configurations written in the old format cannot load on boot because some daemon isn't ready yet and because the old method (the ipsec command) is asynchronous. See the reply to the mail in the mailing list. Surely that's a real reason?

I mean another solution could be to change the service to make sure charon is loaded first, but it would be putting effort into fixing something that's outdated anyway. Strongswan clearly want people to use the new swanctl.

@ip1981
Copy link
Contributor

ip1981 commented Jan 14, 2017

When did this start happening? I had been running strongswan long time without issues.

@basvandijk
Copy link
Member Author

@ip1981 it appears StrongSwan-5.2.0 started recommending swanctl and the vici plugin. See the second and third point in the release notes:

https://wiki.strongswan.org/versions/52

With regards to the PR do note that the existing StrongSwan tools and NixOS module are unaffected by this commit. The only thing this commit does is fixing the broken swanctl tool and adding the charon-systemd binary.

It should be safe to merge.

@ip1981
Copy link
Contributor

ip1981 commented Jan 14, 2017

Ok, then. Though systemd as a dependency is a trigger :D

@basvandijk
Copy link
Member Author

:)

Of course I could make the systemd support optional with a enableSystemd flag. But I propose we try this first and see in practice if more people find the systemd dependency problematic. We can always add it later on.

@fpletz fpletz merged commit f033802 into NixOS:master Jan 14, 2017
@ghost
Copy link

ghost commented Jun 12, 2017

@basvandijk , Thanks a lot for this. Do you have a systemd.services derivation for the daemon?

@basvandijk
Copy link
Member Author

@unlmtd not yet but I actually just started working on a NixOS module for charon-systemd. I don't have a lot of time to work on it the coming two weeks so expect a PR in about three weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants