I have 2 raw Debian 11 VMs connected with an internal network on VirtualBox (see the diagram below). Both VMs have 2 network interfaces (the tunnel-side interface and the private network one). I installed Strongswan on both and set up a very basic PSK-based tunnel between both. No further config has been done (no FW installed, etc).
The tunnel is up. At first, when pinging from, say, 192.168.1.1 to the other side of the tunnel, I had a plaintext ICMP request and a ciphered ESP reply on tcpdump (ping is working). Same stuff happening when I initiate the ping from the other side.
Then, for test reasons, I set the default gateway of each machine to be its tunnel interface (so for machine A, 10.0.50.1 is its GW). However I now have an outgoing ESP packet, a clear ICMP request and the incoming ESP reply (again ping is working)...
Can't give too much info on the files but I was wondering if it was a known basic mistake in the config. Nobody else on the Internet seems to have this issue which is kind of surprising to me.
Thanks