News for hackers. Stuff that matters.
Re:How does Linux NAT a ping? by p1esk on Sunday September 10, 2023 @05:04PM (#37460068)
Why not use the source private IP instead of the “unique value”?
Re:How does Linux NAT a ping? by accrual on Sunday September 10, 2023 @07:52PM (#37461243)
One reason would be to not expose details about your private network to every hop the ICMP packet traverses. Even if knowing you have some 192.168.1.x host is not on its own very useful to an attacker, it'd be preferable to not expose that.

It's another reason WebRTC/STUN was a big issue when it first became widely available, it made it easy to leak details about your LAN to outside servers.

Re:How does Linux NAT a ping? by withinboredom on Monday September 11, 2023 @07:43AM (#37465799)
Besides “security” which is a byproduct of NAT and not a goal, there’s the fact that an ip address can change. The routing tables usually go to MAC addresses, not ip addresses. So it is easier to store a unique id that fits in that field, that then points to a MAC address, that then points to a ip address.