The mapping is scoped to the server endpoint in this toy example.

highlighted = computed this step

The server side must match too

The inbound source is server address 198.51.100.53 port 53.

server port=53\text{server port}=53
Server endpointThe inbound reply tuple is decoded from exact bytes.Inbound reply tuple104 bits / 13 bytes0xc6336435cb007105110035f230byte 0byte 1byte 2byte 311000110001100110110010000110101byte 4byte 5byte 6byte 711001011000000000111000100000101byte 8byte 9byte 10byte 1100010001000000000011010111110010byte 1200110000source-ip198.51.100.53destination-ip203.0.113.5protocol17source-port53destination-port62000(cont.)

The reply is aimed at the public port

The inbound destination port is 62000, matching the public NAT port.

inbound destination port=62000\text{inbound destination port}=62000
Server endpointThe inbound reply tuple is decoded from exact bytes.Inbound reply tuple104 bits / 13 bytes0xc6336435cb007105110035f230byte 0byte 1byte 2byte 311000110001100110110010000110101byte 4byte 5byte 6byte 711001011000000000111000100000101byte 8byte 9byte 10byte 1100010001000000000011010111110010byte 1200110000source-ip198.51.100.53destination-ip203.0.113.5protocol17source-port53destination-port62000(cont.)

The server endpoint will stay the source

The NAT reply step changes the destination side, not this server source side.

server port=53\text{server port}=53
Server endpointThe inbound reply tuple is decoded from exact bytes.Inbound reply tuple104 bits / 13 bytes0xc6336435cb007105110035f230byte 0byte 1byte 2byte 311000110001100110110010000110101byte 4byte 5byte 6byte 711001011000000000111000100000101byte 8byte 9byte 10byte 1100010001000000000011010111110010byte 1200110000source-ip198.51.100.53destination-ip203.0.113.5protocol17source-port53destination-port62000(cont.)

Summary

A matching reply has the expected server source and public NAT destination.

tuple bytes=13\text{tuple bytes}=13
Server endpointThe inbound reply tuple is decoded from exact bytes.Inbound reply tuple104 bits / 13 bytes0xc6336435cb007105110035f230byte 0byte 1byte 2byte 311000110001100110110010000110101byte 4byte 5byte 6byte 711001011000000000111000100000101byte 8byte 9byte 10byte 1100010001000000000011010111110010byte 1200110000source-ip198.51.100.53destination-ip203.0.113.5protocol17source-port53destination-port62000(cont.)