Network comprehension question: localhost vs. local IP address

Volker Wysk post at volker-wysk.de
Wed Jun 14 04:57:55 UTC 2017


Am Mittwoch, 14. Juni 2017, 00:19:00 CEST schrieb Colin Watson:
> Now, when a server binds a socket so that it can receive packets on it,
> it typically either binds to a port on all the host's network interfaces
> (programs do this using a constant called INADDR_ANY, and you may
> sometimes see references to this in documentation) or to a specific
> address and port.  If it does the latter, it will only receive packets
> whose destination is that particular address, not any other address that
> the host may happen to possess even if the port is correct.  

Yes, that's the missing piece of information. :-)

> It sounds
> like the server in question here bound itself specifically to
> localhost:8080, i.e. 127.0.0.1:8080 after name resolution, in which case
> it won't also be listening on 192.168.178.20:8080.

Yes, that's what I've later found in a (brief) comment in the configuration 
file. 

Thanks for your elaborate answer!

Volker





More information about the ubuntu-users mailing list