My question is somewhat extending on this discussion: NAT and UDP replies
Scenario: Machine A behind NAT Machine B on the internet
- machine A:Port M sends a UDP packet to Machine B:PortN
- Machine B:Port N sends reply to machine A:Port M (I know that there is a NAT translation in the middle which is transparent to both machines)
Will the NAT mechanism on machine A's public router work, if the source port of machine B is different.
That is, replacing step 2 with the following still work and machine A receive UDP reply from machine B:
2. Machine B: Port Z sends reply to machine A:Port M
This probably won't work or else it will be a security risk? OR Depends on how NAT is configured?