I'm at my wit's-end here with this issue.
I have a stongswan VM with only 1 private internet interface (ens18). I can successfully connect to it and get a virtual IP, but my problem is the network beyond the strongswan VM sees the roadwarrior user's traffic originating from the strongswan VM, instead of directly from the roadwarrior's virtual IP address. I would like to be able to control the user's access on the hardware/router, so I need the traffic to originate from the virtual IP. Here's a better explanation via diagram:
Below are my configurations:
Routing Table:
[root@moon ~]# ip route list
default via 172.16.18.1 dev ens18 proto static metric 100
172.16.18.1/28 dev ens18 proto kernel scope link src 172.16.18.2 metric 100
My ipsec.conf file:
[root@moon strongswan]# cat /etc/strongswan/ipsec.conf
#charondebug="all"
conn myConfig
keyexchange=ikev2
ike=aes256-sha384-modp4096!
esp=aes256gcm16-ecp384!
dpdaction=clear
dpddelay=60s
left=%any
leftid=moon.mydomain.com
leftsubnet=172.16.18.1/24,172.16.202.1/24
leftcert=moon.der
leftsendcert=always
right=%any
rightauth=eap-tls
rightdns=172.16.16.1
eap_identity=%identity
auto=route
conn rw_HERBERT
rightid=herbert@mydomain.com
rightsourceip=172.16.18.3/32
also=myConfig
My interface configuration file:
[root@moon strongswan]# cat /etc/sysconfig/network-scripts/ifcfg-ens18
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens18"
UUID="aaaaaaaa-cccccccccc-dddddddddd-1111111"
DEVICE="ens18"
ONBOOT="yes"
IPADDR="172.16.18.2"
PREFIX="24"
GATEWAY="172.16.18.1"
DNS1="172.16.16.1"
DNS2="172.16.16.2"
DOMAIN="mydomain.com"
IPV6_PRIVACY="no"
ZONE=dmz
Any help is greatly appreciated and I sincerely thank you for your time.