Server programs see my IP instead of actual client IP as the source of incoming connections

Any server program (Apache, netcat with -l, Minecraft server) can’t see the IP of the connecting client.
Instead they see the connection as coming from my own public IP (but from some weird port).
I have no idea what is causing this but because it happens on all machines in the network, I will quickly go over my router setup too.

I have two routers, one provided by the ISP and a pretty standard WIFI router.
The one from the ISP is set to “Bridge Mode” which, according to the ISP, disables NAT, Firewall and Routing. It should only function as a modem.
This seems to work, the WIFI router reports my actual public IP as the WAN IP.

The ports are port-forwarded and the services work normally.

On a side note, I read that some proxies would fill in the HTTP “X-Forwarded-For” field. This is not the case here.

Answer

Your internal IP addresses have no meaning on the internet.
Your one and only IP address on the internet is the one assigned to you by the ISP.

Any server on the internet cannot distinguish between any and all of your computers and
will see them as coming from the same address.

The magic that makes it work is called
Network address translation (NAT),
which is done by the router that houses the
DHCP
server.

Study well the above links.

Attribution
Source : Link , Question Author : MelonDude , Answer Author : harrymc

Leave a Comment