0

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

Network Diagram

  • If would be helpful if you specified on which hosts/interfaces you run tcpdump. Anyway, have you read this [entry in the strongSwan FAQ](https://wiki.strongswan.org/projects/strongswan/wiki/FAQ#Capturing-outbound-plaintext-packets-with-tcpdumpwireshark)? – ecdsa Feb 16 '22 at 14:01
  • I run tcpdump on the IPsec interfaces (either 10.0.50.1 or 10.0.80.1) to check that packets are correctly encrypted. If I understand correctly this is normal behaviour? – elfamosomojito Feb 16 '22 at 14:21
  • If you are seeing inbound plaintext packets after inbound ESP packets, yes. – ecdsa Feb 17 '22 at 09:47
  • I did some additional testing; I enabled ufw to allow only port 500 and 4500 udp on 10.0.80.1. When pinging from 192.168.1.1 to 172.16.50.1 (and capturing on 10.0.80.1), I see an inbound ESP packet but no answer, and ping is NOK. When I disable ufw, ping is OK. If I'm not mistaken the ping should be encrypted and working... – elfamosomojito Feb 18 '22 at 10:27

0 Answers0