5

I have just run netstat on my raspberry pi and found out there more than 100 (!) open connections. Is this something I should be worried about? How do I stop my rasp pi from opening so many connections?

I have arch linux installed on it.

  • 1
    Wow, paste the output. – Alex Chamberlain Oct 12 '12 at 13:24
  • 1
    maybe its updates? :) – Piotr Kula Oct 12 '12 at 14:34
  • 1
    Yes, where are the connections to? – HeatfanJohn Oct 13 '12 at 0:13
  • 2
    Do a sudo netstat -a --program to see which PID / program opened the connection. – HeatfanJohn Oct 13 '12 at 0:17
  • 1
    @pap42 - so what inappropriate actual connection to a remote system did you find? – Chris Stratton Oct 15 '12 at 13:48
3

Execute the following command to see which PID (Process ID) / Program opened the connection:


sudo netstat -a --program

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:9090                  *:*                     LISTEN      1016/xbmc.bin
tcp        0      0 *:sunrpc                *:*                     LISTEN      825/rpcbind
tcp        0      0 *:http                  *:*                     LISTEN      1016/xbmc.bin
tcp        0      0 *:ftp                   *:*                     LISTEN      741/vsftpd
tcp        0      0 *:ssh                   *:*                     LISTEN      727/sshd
tcp        0      0 *:36666                 *:*                     LISTEN      1016/xbmc.bin
tcp        0      0 *:36667                 *:*                     LISTEN      1016/xbmc.bin
tcp        0      0 37L4247F26-13:ssh       jpm-lt:54418            ESTABLISHED 3477/sshd: pi [priv
tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN      825/rpcbind
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      727/sshd
udp        0      0 *:45593                 *:*                                 442/dhclient
udp        0      0 *:9777                  *:*                                 1016/xbmc.bin
udp        0      0 *:bootpc                *:*                                 442/dhclient
udp        0      0 *:sunrpc                *:*                                 825/rpcbind
udp        0      0 37L4247F26-13:ntp       *:*                                 736/ntpd
udp        0      0 raspbmc:ntp             *:*                                 736/ntpd
udp        0      0 *:ntp                   *:*                                 736/ntpd
udp        0      0 *:987                   *:*                                 825/rpcbind
udp        0      0 *:43753                 *:*                                 731/avahi-daemon: r
udp        0      0 *:mdns                  *:*                                 731/avahi-daemon: r
udp6       0      0 [::]:26705              [::]:*                              442/dhclient
udp6       0      0 [::]:sunrpc             [::]:*                              825/rpcbind
udp6       0      0 raspbmc:ntp             [::]:*                              736/ntpd
udp6       0      0 fe80::ba27:ebff:fea:ntp [::]:*                              736/ntpd
udp6       0      0 [::]:ntp                [::]:*                              736/ntpd
udp6       0      0 [::]:35477              [::]:*                              731/avahi-daemon: r
  • You forgot to put the command. – Jivings Oct 14 '12 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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