I am trying to get a vpn connection set up to connect to my router but very unsuccessfully. I am on Ubuntu and am very lost.
The server is set up to use Ipsec, IKEv2, AES256 and SHA2 256 with preshared key. Bit depth is 14.
So the server is all set up I guess. I hope correctly. I am struggling to set up the client with my ubuntu. I tried to use L2TP over Ipsec but I couldn't connect. I also tried strongswan but I I don't know how to configure it correctly.
Is there a straightforward way to set that up? Which would be the best client? Strongswan, vpnc, openvpn?? I can't even figure that out...
And how could I set this up? On a Mac the following works fine:
Server address: mystaticip
Remote ip: localIdinMyrouter
LocalID: peeridinmyrouter
For any help or hint I am very grateful. Thanks in advance
As client software you could use strongSwan (the other tools you mention don't use the IKEv2 protocol).
On Ubuntu you may use strongSwan's NetworkManager plugin (network-manager-strongswan package), but note that it requires strong pre-shared keys (at least 20 characters). If that's the case, the configuration is quite simple (similar to what you configure on macOS, the username field takes the client's identity).
However, it's not possible to configure the server's identity explicitly (the configured hostname/IP address is used).The server's identity can optionally be configured since strongSwan 5.8.3 / NetworkManager-strongswan 1.5.0.If the PSK is too short (or you use an older version and you have to be able to set the remote identity), you'll have to configure strongSwan via config file and manage it via command line. The legacy (but on Ubuntu still default) configuration backend (starter/stroke) uses the following two files and a management tool called
ipsec
./etc/ipsec.conf
:/etc/ipsec.secrets
:Afterwards, restart the service (e.g. via
systemctl restart strongswan
on current versions of Ubuntu, don't useipsec start|stop
directly) and useipsec up home
to initiate the connection.Documentation about the newer configuration backend may be found on the strongSwan wiki.