



the web server replies to the request and sends the reply with a source IP address of 192.168.1.2 back to the router’s LAN interface IP address of 192.168.1.1.The destination IP address is 192.168.1.2, and the source IP address is 192.168.1.1. It also source NATs the packet and replaces the source IP address in the packet with the IP address on its LAN interface. the router destination NATs the packet to 192.168.1.2 and replaces the destination IP address in the packet accordingly.With that additional rule, the flow now changes: The rule below is very specific to only apply to the traffic that the issue could occur with - if there are many servers the issue occurs with, the rule could be made broader to save having one such exception per forwarded service.Īdd chain=srcnat src-address=192.168.1.0/24 \ĭst-address=192.168.1.2 protocol=tcp dst-port=80 \ To fix the issue, an additional NAT rule needs to be introduced on the router to enforce that all reply traffic flows through the router, despite the client and server being on the same subnet. As far as the client is concerned the packet is invalid and not related to any connection the client previously attempted to establish.

The client receives the reply packet, but it discards it because it expects a packet back from 1.1.1.1, and not from 192.168.1.2. The web server does not send the reply back to the router, but sends it back directly to 192.168.1.10 with a source IP address in the reply of 192.168.1.2. However, the source IP address of the request is on the same subnet as the web server. the server replies to the client’s request.The source IP address stays the same: 192.168.1.10. the client sends a packet with a source IP address of 192.168.1.10 to a destination IP address of 1.1.1.1 on port tcp/80 to request some web resource.When a client on the same internal network as the web server requests a connection to the web server’s public IP address, the connection breaks. The client receives the reply packet it expects, and the connection is established.
