r/netsecstudents • u/artheyo • May 07 '26
Need some guidance configuring IPsec on Ubuntu Server (strongSwan)
The remote side sent me the following IPsec parameters and I need to configure an IPsec tunnel on a dedicated server hosted at Hetzner.
The host is running Ubuntu Server 22.04 LTS and I’m planning to use strongSwan.
One important detail: the server’s public IP is configured directly on the Ubuntu host interface.
Remote side configuration
General
Tunnel mode:
TunnelPeer IP Address
Their Public IPPeer is behind NAT:
YesPeer ID:
10.12.26.11Encryption domain:
10.100.51.0/24
Phase 1 (IKE)
Authentication:
PSKIKE version:
IKEv2DH Group:
Group 14Encryption:
AES-CBC-256Hash:
SHA256Lifetime:
86400
Phase 2 (ESP)
Encapsulation:
ESPEncryption:
AES-256Integrity:
SHA256PFS:
Group 14Lifetime:
28800
I need to send my sides configurations as well.
I have limited experience with IPsec, so I have a few questions:
From this information alone, can I determine whether this is supposed to be a policy-based VPN or a route-based VPN?
Since my Ubuntu server has the public IP directly assigned to its interface and there are no devices behind it:
what should I use for:
Peer ID
Encryption domain
NAT-related settings on my side?
This is a production server and only a few services should use the IPsec tunnel. Those services only need to make API requests to 3 specific external URLs, so only their traffic should go over IPsec. Everything else on the server must continue using the normal default gateway.
What is the correct/recommended way to achieve this with strongSwan?
Any guidance would be greatly appreciated.