0

Ubuntu 14.04

$ netstat -anu | less
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
udp        0      0 0.0.0.0:39262           0.0.0.0:*                          
udp        0      0 0.0.0.0:37225           0.0.0.0:*                          
udp        0      0 0.0.0.0:47490           0.0.0.0:*                          
udp        0      0 0.0.0.0:47500           0.0.0.0:*                          
udp        0      0 0.0.0.0:33169           0.0.0.0:*                          
udp        0      0 0.0.0.0:35219           0.0.0.0:*                          
udp        0      0 0.0.0.0:55714           0.0.0.0:*                          
udp        0      0 0.0.0.0:33190           0.0.0.0:*                          
udp        0      0 0.0.0.0:35240           0.0.0.0:*                          
udp        0      0 0.0.0.0:41392           0.0.0.0:*                          
udp        0      0 0.0.0.0:43465           0.0.0.0:*                          
udp        0      0 0.0.0.0:45532           0.0.0.0:*                          
udp        0      0 0.0.0.0:59877           0.0.0.0:*                          
udp        0      0 0.0.0.0:514             0.0.0.0:*                          
udp        0      0 0.0.0.0:37383           0.0.0.0:*                          
udp        0      0 0.0.0.0:57865           0.0.0.0:* 
...

None of the UDP "connections" are in the LISTEN state, but none of them have a foreign address. What does this output mean?

Paul Draper
  • 317
  • 5
  • 24

1 Answers1

0

UDP is stateless. Those are processes that have called the recvfrom() system call to wait for an incoming datagram on the ports indicated in the local address column. If you want to see the PID/Program name run netstat -anup (as root).

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • So, they are listening to incoming UDP packets, even though the state is not LISTEN? – Paul Draper Jun 07 '17 at 07:06
  • I explained it incorrectly. `netstat` is providing information about sockets, not processes. A socket that uses the UDP protocol has no state information. The process is in some sense "listening" by calling `recvfrom()` etc. but there is no state to the socket. – Mark Wagner Jun 07 '17 at 23:32