Network topology
Certificate files
- moon (gateway)
- carol (roadwarrior)
Configuration
- moon (gateway)
- carol (roadwarrior)
remote block has no id restriction — it accepts any client that presents a certificate signed by the trusted CA.DNS resolution at runtime
Carol’sremote_addrs = moon.strongswan.org is a hostname rather than an IP address. strongSwan resolves this via DNS at the time the connection is initiated, so carol’s configuration does not need to change if the gateway’s IP address changes.
Client identity with email address
Carol’s IKEv2 identity is[email protected] (an RFC 822 email address). This value must be present as a subjectAlternativeName (SAN) in carolCert.pem. The gateway uses this identity to distinguish clients from each other.
When generating carol’s certificate with
pki, add the SAN with:Variant: virtual IP addresses
Roadwarriors typically have a different IP address each time they connect, making return routing frommoon-net back to the client difficult. Assigning a virtual IP from a fixed pool solves this.
Gateway configuration with pool
Roadwarrior configuration requesting a virtual IP
vips = 0.0.0.0 tells the client to request an IPv4 virtual IP from the gateway using either IKEv2 configuration payloads or IKEv1 mode config.