Score:0

Strongswan clear traffic issue

kr flag

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

cn flag
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)?
elfamosomojito avatar
kr flag
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?
cn flag
If you are seeing inbound plaintext packets after inbound ESP packets, yes.
elfamosomojito avatar
kr flag
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...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.