Port open to localhost but not actual IP

I'm running ubuntu inside a virtual machine with VMWare. I'd like to connect to port 8080 from outside the VM. I can't copy and paste text from the VM so you'll have to trust me on this:

The VM's IP address is 192.168.127.129

From the VM:

'nmap localhost' shows ports 22, 80, 1521, and 8080 open. 'nmap 192.168.127.129' only shows ports 22, 80, and 1521 open.

Am I missing something obvious here?


localhost is an internal interface with IP address 127.0.0.1.

192.168.127.129 belongs to your external interface (which in this case happens to be a virtual network interface as opposed to a physical one). localhost and 192.168.127.129 are two different interfaces and so you will get different results, depending on how your network services are configured.

Whatever service you have running on port 8080 only listens on the loopback interface and is not available to the rest of the world, only TCP/IP clients connecting from localhost.


What service is listening on port 8080? You'll probably have to look at the service's configuration, many services only listen on 127.0.0.1 by default for security reasons.