IPv6 Debugging: Server socket binding: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
New page: 14.1. Server socket binding 14.1.1. Using “netstat” for server socket binding check It's always interesting which server sockets are currently active on a node. Using “netstat” is...
 
Onnowpurbo (talk | contribs)
No edit summary
 
Line 1: Line 1:
14.1. Server socket binding
Gunakan “netstat” untuk server cek socket binding
14.1.1. Using “netstat” for server socket binding check


It's always interesting which server sockets are currently active on a node. Using “netstat” is a short way to get such information:
Biasanya akan menarik untuk melihat soket yang aktif di sebuah node.  
Menggunakan "netstat" adalah cara yang paling cepat untuk memperoleh informasi tersebut.


Used options: -nlptu
Gunakan opsi: -nlptu


Example:
Contoh:


# netstat -nlptu
# netstat -nlptu
Active Internet connections (only servers)
 
Proto Recv-Q Send-Q Local Address          Foreign Address        State    
Active Internet connections (only servers)
¬ PID/Program name
Proto Recv-Q Send-Q Local Address          Foreign Address        State       PID/Program name
tcp        0      0 0.0.0.0:32768          0.0.0.0:*              LISTEN    
tcp        0      0 0.0.0.0:873            0.0.0.0:*              LISTEN     1493/rsync     
¬ 1258/rpc.statd
tcp        0      0 127.0.0.1:3306          0.0.0.0:*              LISTEN     1178/mysqld      
tcp        0      0 0.0.0.0:32769          0.0.0.0:*              LISTEN     
tcp        0      0 0.0.0.0:139             0.0.0.0:*              LISTEN     1033/smbd     
¬ 1502/rpc.mountd
tcp        0      0 127.0.1.1:53            0.0.0.0:*              LISTEN     1546/dnsmasq   
tcp        0      0 0.0.0.0:515             0.0.0.0:*              LISTEN    
tcp        0      0 0.0.0.0:22              0.0.0.0:*              LISTEN     593/sshd       
¬ 22433/lpd Waiting
tcp        0      0 127.0.0.1:631          0.0.0.0:*              LISTEN     878/cupsd     
tcp        0      0 1.2.3.1:139            0.0.0.0:*              LISTEN    
tcp        0      0 0.0.0.0:25              0.0.0.0:*              LISTEN     1436/master      
¬ 1746/smbd
tcp        0      0 0.0.0.0:445            0.0.0.0:*              LISTEN     1033/smbd     
tcp        0      0 0.0.0.0:111            0.0.0.0:*              LISTEN    
tcp6      0      0 :::873                  :::*                   LISTEN     1493/rsync     
¬ 1230/portmap
tcp6      0      0 :::139                  :::*                    LISTEN     1033/smbd     
tcp        0      0 0.0.0.0:6000            0.0.0.0:*              LISTEN    
tcp6      0      0 :::80                   :::*                    LISTEN     1843/apache2   
¬ 3551/X
tcp6      0      0 :::22                  :::*                    LISTEN     593/sshd       
tcp        0      0 1.2.3.1:8081            0.0.0.0:*              LISTEN     
tcp6      0      0 ::1:631                :::*                    LISTEN     878/cupsd     
¬ 18735/junkbuster
tcp6      0      0 :::25                   :::*                    LISTEN     1436/master      
tcp        0      0 1.2.3.1:3128            0.0.0.0:*              LISTEN    
tcp6      0      0 :::445                  :::*                    LISTEN     1033/smbd     
¬ 18822/(squid)
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1546/dnsmasq   
tcp        0      0 127.0.0.1:953          0.0.0.0:*               LISTEN    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1434/dhclient 
¬ 30734/named
udp        0      0 0.0.0.0:41040           0.0.0.0:*                           817/avahi-daemon: r
tcp        0      0 ::ffff:1.2.3.1:993      :::*                    LISTEN    
udp        0      0 192.168.0.255:137      0.0.0.0:*                           2084/nmbd     
¬ 6742/xinetd-ipv6
udp        0      0 192.168.0.139:137       0.0.0.0:*                           2084/nmbd      
tcp        0      0 :::13                   :::*                    LISTEN    
udp        0      0 0.0.0.0:137            0.0.0.0:*                           2084/nmbd      
¬ 6742/xinetd-ipv6
udp        0      0 192.168.0.255:138       0.0.0.0:*                           2084/nmbd      
tcp        0      0 ::ffff:1.2.3.1:143      :::*                    LISTEN    
udp        0      0 192.168.0.139:138       0.0.0.0:*                           2084/nmbd      
¬ 6742/xinetd-ipv6
udp        0      0 0.0.0.0:138            0.0.0.0:*                           2084/nmbd     
tcp        0      0 :::53                  :::*                    LISTEN    
udp        0      0 0.0.0.0:7357           0.0.0.0:*                           1434/dhclient 
¬ 30734/named
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           817/avahi-daemon: r
tcp        0      0 :::22                   :::*                    LISTEN     
udp6      0      0 :::59413                :::*                               1434/dhclient 
¬ 1410/sshd
udp6      0      0 :::60500                :::*                               817/avahi-daemon: r
tcp        0      0 :::6010                :::*                    LISTEN    
udp6      0      0 :::5353                :::*                               817/avahi-daemon: r
¬ 13237/sshd
udp        0      0 0.0.0.0:32768          0.0.0.0:*                        
¬ 1258/rpc.statd
udp        0      0 0.0.0.0:2049            0.0.0.0:*                        
¬ -
udp        0      0 0.0.0.0:32770           0.0.0.0:*                        
¬ 1502/rpc.mountd
udp        0      0 0.0.0.0:32771          0.0.0.0:*                        
¬ -
udp        0      0 1.2.3.1:137             0.0.0.0:*                        
¬ 1751/nmbd
udp        0      0 0.0.0.0:137            0.0.0.0:*                        
¬ 1751/nmbd
udp        0      0 1.2.3.1:138             0.0.0.0:*                        
¬ 1751/nmbd
udp        0      0 0.0.0.0:138             0.0.0.0:*                        
¬ 1751/nmbd
udp        0      0 0.0.0.0:33044          0.0.0.0:*                        
¬ 30734/named
udp        0      0 1.2.3.1:53              0.0.0.0:*                         
¬ 30734/named
udp        0      0 127.0.0.1:53           0.0.0.0:*                        
¬ 30734/named
udp        0      0 0.0.0.0:67              0.0.0.0:*                        
¬ 1530/dhcpd
udp        0      0 0.0.0.0:67              0.0.0.0:*                        
¬ 1530/dhcpd
udp        0      0 0.0.0.0:32858          0.0.0.0:*                         
¬ 18822/(squid)
udp        0      0 0.0.0.0:4827            0.0.0.0:*                         
¬ 18822/(squid)
udp        0      0 0.0.0.0:111            0.0.0.0:*                        
¬ 1230/portmap
udp        0      0 :::53                  :::*                              
¬ 30734/named

Latest revision as of 02:31, 27 June 2013

Gunakan “netstat” untuk server cek socket binding

Biasanya akan menarik untuk melihat soket yang aktif di sebuah node. Menggunakan "netstat" adalah cara yang paling cepat untuk memperoleh informasi tersebut.

Gunakan opsi: -nlptu

Contoh:

# netstat -nlptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:873             0.0.0.0:*               LISTEN      1493/rsync      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1178/mysqld     
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1033/smbd       
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1546/dnsmasq    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      593/sshd        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      878/cupsd       
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1436/master     
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1033/smbd       
tcp6       0      0 :::873                  :::*                    LISTEN      1493/rsync      
tcp6       0      0 :::139                  :::*                    LISTEN      1033/smbd       
tcp6       0      0 :::80                   :::*                    LISTEN      1843/apache2    
tcp6       0      0 :::22                   :::*                    LISTEN      593/sshd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      878/cupsd       
tcp6       0      0 :::25                   :::*                    LISTEN      1436/master     
tcp6       0      0 :::445                  :::*                    LISTEN      1033/smbd       
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1546/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1434/dhclient   
udp        0      0 0.0.0.0:41040           0.0.0.0:*                           817/avahi-daemon: r
udp        0      0 192.168.0.255:137       0.0.0.0:*                           2084/nmbd       
udp        0      0 192.168.0.139:137       0.0.0.0:*                           2084/nmbd       
udp        0      0 0.0.0.0:137             0.0.0.0:*                           2084/nmbd       
udp        0      0 192.168.0.255:138       0.0.0.0:*                           2084/nmbd       
udp        0      0 192.168.0.139:138       0.0.0.0:*                           2084/nmbd       
udp        0      0 0.0.0.0:138             0.0.0.0:*                           2084/nmbd       
udp        0      0 0.0.0.0:7357            0.0.0.0:*                           1434/dhclient   
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           817/avahi-daemon: r
udp6       0      0 :::59413                :::*                                1434/dhclient   
udp6       0      0 :::60500                :::*                                817/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                817/avahi-daemon: r