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.

  • 1
    Is the connecting client in the same LAN as the server?
    – user1686
    Dec 13, 2020 at 12:47
  • @user1686 No, I have tried from my phone using mobile data and had a friend connect to the website. Minecraft players were also not in the LAN.
    – MelonDude
    Dec 13, 2020 at 12:51
  • What WAN IP does your router get? I mean from it's web page or settings app, NOT what your PC would see? My guess is that your ISP's modem/router is not really in bridge mode, but is performing a 1:1 NAT (if your router reports it's WAN IP as a private IP that is the case, if it reports a true public IP then we need to look at something else). Either that, or your router just does not handle port forwarding properly and is reporting the incorrect IP, but you did not state your specific router.
    – acejavelin
    Dec 13, 2020 at 15:47
  • @acejavelin Thank you for the reply. The router does indeed show its WAN IP to be my public IP in the web interface. It's a TL-WR841N. Is there some way to check if it's that router? Are there any router options I should try changing? I tried the "DMZ" feature which is just an exposed host (no port forwarding required) but the problem remained.
    – MelonDude
    Dec 13, 2020 at 18:44

2 Answers 2


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.

  • The problem is that my server can't see the source of the incoming packets when they come from a different household.
    – MelonDude
    Dec 13, 2020 at 18:48
  • That depends on what you are doing. Much more detail is required in order to answer where is the problem.
    – harrymc
    Dec 13, 2020 at 18:55
  • I know but I have no idea what's causing this so I don't know what I need to tell you. My current suspicion is that my router isn't port forwarding correctly but I don't know how to test this.
    – MelonDude
    Dec 13, 2020 at 19:06
  • More probably this is because of how you are asking about the IP. If this is inside a program, the question is more suitable for Stack Overflow. If this is the way you are using a server, you can start a new post here with the required details.
    – harrymc
    Dec 13, 2020 at 20:04
  • This happens on all devices in the network that I have tried (Linux, Windows, Mac OS) and with all programs that I have tried (netcat -l, Apache Webserver, python -m SimpleHTTPServer, Minecraft Server).
    – MelonDude
    Dec 13, 2020 at 21:12

First I would like to apologize for my imprecise question, it's my first time here.

I was referring to packets coming from the internet.

I have now found out that it's a quirk of one of the routers (unfortunately I can't test which because i don't have any other routers to test with).

It is either the port forwarding of the TP-LINK TL-WR841N wifi router or something about the cbn CH7466CE in "Bridge Mode" as a modem.

My workaround is simply to turn off "Bridge Mode" and use that router as the main router of the household. The wifi router is still connected for wifi but all the computers (including crucially the server that I was having the issue with) are now connected to the router I was using a modem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.