Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If I run find out running processes were associated with each open port, I would use netstat along with the following flags:

netstat -tulpn

This program lists the following output:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1199/dnsmasq    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1004/cupsd      
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1157/postgres   
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1121/mysqld     
tcp6       0      0 ::1:631                 :::*                    LISTEN      1004/cupsd      
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1199/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1070/dhclient   
udp        0      0 0.0.0.0:39617           0.0.0.0:*                           990/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           990/avahi-daemon: r
udp6       0      0 :::57021                :::*                                990/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                990/avahi-daemon: r

So, I can see that the mysqld server process is listening on port 3306 and the postgresql server process is listening on 5432 and my dns server is listening on 53 and so forth. In other words, when I create a network connection with my ip and those ports specified, I can access these server processes. However, there is a field that says "Foreign Address". That is supposed to represent the foreign IP address (the other computer or network device). But that doesn't make sense, because there is no other computer or network device associated with these processes. So what does this 0.0.0:* mean?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It means exactly what you said: there is no other computer associated with that progress. If you were connected to another machine on a service, that computers IP address and the port used for the connection would show up under the foreign address column.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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