Today’s post is about how to solve common StrongSwan IPSec VPN problems. If you are a Linux user, you may noticed that when you install StrongSwan using APT or building from source, the VPN is not working correctly: the network is _unreachable _or the traffic is not being encapsulated. This is a common problem in latest Debian based distributions or other ones that use systemd as resolver.
Well, the solution is pretty simple actually. Come with me for learning how to solve this.
The first step will be installing StrongSwan client with all required dependencies. You can do it via APT by:
Then, we must check out NetworkManager settings:
As we can see in the result above, it is important that the
[ifupdown] is set to
false (it can work with it set to
In addition, check that you have the line that says
dns=default. If it is not, you must change it in order to have Internet connection later. For this purpose, you just edit the NetworkManager.conf file and add, in the
[main] section, the
Now, we are going to disable systemd-resolve for letting NetworkManager completely manage the network connections – this is useful client side only; when working with servers, NetworkManager is not being as used as systemd-resolve or other utilities.
And that is it! We now have NetworkManager handling all connections and now our VPN client should work correctly. If you have any issues, please feel free to comment below either asking at some Telegram group.
Please, consider sharing this article if you found it useful 😄