Florian
Florian

Reputation: 1

Tcp: Public remote endpoint but private local endpoint?

my situation looks like this: I forwarded the port 80 on my router, that is connected to the internet and linked it to my pc. On my pc i'm running a C# program (i use the class HttpListener) which logs every TCP connection that is going on. It prints the timestamp, remote endpoint and the local endpoint.

I expect that, when my remote endpoint is a public ip, then my local endpoint is the public ip from my router.

But in my log file i found this

62.143.189.207 (remote), 192.168.178.25 (local)

Can anyone tell, how is that possible?

Upvotes: 0

Views: 177

Answers (1)

Ken Forsythe
Ken Forsythe

Reputation: 501

Your application is an http listener bound to a network interface on your PC.

All your NIC knows is your local ip address. It doesn’t actually know anything about the public facing address on your router.

When a request comes in, the router is performing the address translation, directing port 80 traffic to your PC and thusly returning traffic right back to the client.

Upvotes: 1

Related Questions