NAT erroneously altering source address of UDP packets
Posted: 7. Oct 2020, 07:14
i don't know why this is happening, i have never seen a single other NAT device do this, but...
I have a VM with a 'NAT' nic and that NIC has UDP port 12345 forwarded from host to guest. some IP addresses:
host LAN: 10.0.3.3/24
host default gateway: 10.0.3.1
guest LAN: 10.0.2.15/24
guest default gateway: 10.0.2.2
when the host receives a UDP packet from some other host (10.0.3.4, say) at port 12345, it port-forwards it to the guest, but for some reason i can't figure, it changes the source address. this is crazy, i have never seen a NAT device change the source address of incoming packets. obviously this breaks stuff all over the place.
here's wireshark on the host:
here's tcpdump on the guest:
it looks like it's changing the source port, too.
I would expect the tcpdump line to look like this:
why is it doing this? an more importantly how do i stop it doing this?
(( Version 6.1.12 r139181 (Qt5.6.2) ))
I have a VM with a 'NAT' nic and that NIC has UDP port 12345 forwarded from host to guest. some IP addresses:
host LAN: 10.0.3.3/24
host default gateway: 10.0.3.1
guest LAN: 10.0.2.15/24
guest default gateway: 10.0.2.2
when the host receives a UDP packet from some other host (10.0.3.4, say) at port 12345, it port-forwards it to the guest, but for some reason i can't figure, it changes the source address. this is crazy, i have never seen a NAT device change the source address of incoming packets. obviously this breaks stuff all over the place.
here's wireshark on the host:
Code: Select all
58004 4.367054 10.0.3.4 10.0.3.3 UDP 60 45947 → 12345 Len=5Code: Select all
22:26:06.386828 IP 10.0.2.15.4840> 10.0.2.2.12345 UDP, length 37I would expect the tcpdump line to look like this:
Code: Select all
22:26:06.386828 IP 10.0.3.4.45947> 10.0.2.2.12345 UDP, length 37why is it doing this? an more importantly how do i stop it doing this?
(( Version 6.1.12 r139181 (Qt5.6.2) ))