Liste des Ports

De Avided.info
Aller à : navigation, rechercher


netstat

  • Unix/Linux

=> -an permet d'avoir comme pour windows tous les états des communications réseau

=> -rn affiche la table de routage

# Liste seulement les port en ecoute
netstat -taupen
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name   
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      0          60350      13173/vsftpd        
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      0          224282     1714/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      0          10962      1109/master         
tcp        0      0 94.23.14.166:22             83.155.133.225:35754        ESTABLISHED 0          205068     29409/sshd          
tcp        0    224 94.23.14.166:22             83.155.133.225:35752        ESTABLISHED 0          204255     29222/sshd          
tcp        0      0 94.23.14.166:22             83.155.133.225:35677        ESTABLISHED 0          196563     27507/sshd          
tcp        0      0 :::22                       :::*                        LISTEN      0          224284     1714/sshd           


  • Windows

voir aussi -e -s pour des statistique ou -r pour la table de routage

C:\Users\bass>netstat -an

Connexions actives

  Proto  Adresse locale         Adresse distante       État
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:554            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:902            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:912            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2869           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:10243          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49153          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49154          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49155          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49156          0.0.0.0:0              LISTENING
  TCP    192.168.0.240:139      0.0.0.0:0              LISTENING
  TCP    192.168.0.240:51942    173.194.67.19:443      ESTABLISHED
  TCP    192.168.0.240:51943    173.194.78.125:5222    ESTABLISHED
  TCP    192.168.0.240:54557    192.168.0.145:22       ESTABLISHED
  TCP    192.168.0.240:54710    192.168.0.145:22       ESTABLISHED
  TCP    192.168.0.240:54975    173.194.40.136:443     ESTABLISHED
  TCP    192.168.0.240:55250    192.168.0.200:445      ESTABLISHED
  TCP    192.168.0.240:55308    81.93.191.105:80       TIME_WAIT
  TCP    192.168.0.240:55320    81.93.191.97:80        TIME_WAIT
  TCP    192.168.0.240:55336    91.225.248.80:80       TIME_WAIT
  TCP    192.168.0.240:55357    74.125.235.47:443      ESTABLISHED
  TCP    192.168.0.240:55359    173.194.45.36:443      ESTABLISHED
  TCP    192.168.0.240:55360    173.194.34.1:443       ESTABLISHED
  TCP    192.168.0.240:55361    173.194.40.197:443     ESTABLISHED
  TCP    192.168.15.1:139       0.0.0.0:0              LISTENING
  TCP    192.168.188.1:139      0.0.0.0:0              LISTENING
  TCP    [::]:135               [::]:0                 LISTENING
  TCP    [::]:445               [::]:0                 LISTENING
  TCP    [::]:554               [::]:0                 LISTENING
  TCP    [::]:2869              [::]:0                 LISTENING
  TCP    [::]:3389              [::]:0                 LISTENING
  TCP    [::]:3587              [::]:0                 LISTENING
  TCP    [::]:5357              [::]:0                 LISTENING
  TCP    [::]:10243             [::]:0                 LISTENING
  TCP    [::]:49152             [::]:0                 LISTENING
  TCP    [::]:49153             [::]:0                 LISTENING
  TCP    [::]:49154             [::]:0                 LISTENING
  TCP    [::]:49155             [::]:0                 LISTENING
  TCP    [::]:49156             [::]:0                 LISTENING
  UDP    0.0.0.0:3389           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:3702           *:*
  UDP    0.0.0.0:5004           *:*
  UDP    0.0.0.0:5005           *:*
  UDP    0.0.0.0:5355           *:*
  UDP    0.0.0.0:56387          *:*
  UDP    0.0.0.0:58201          *:*
  UDP    0.0.0.0:65232          *:*
  UDP    127.0.0.1:1900         *:*
  UDP    127.0.0.1:63236        *:*
  UDP    192.168.0.240:137      *:*
  UDP    192.168.0.240:138      *:*
  UDP    192.168.0.240:1900     *:*
  UDP    192.168.0.240:63233    *:*
  UDP    192.168.15.1:137       *:*
  UDP    192.168.15.1:138       *:*
  UDP    192.168.15.1:1900      *:*
  UDP    192.168.15.1:63235     *:*
  UDP    192.168.188.1:137      *:*
  UDP    192.168.188.1:138      *:*
  UDP    192.168.188.1:1900     *:*
  UDP    192.168.188.1:63234    *:*
  UDP    [::]:3389              *:*
  UDP    [::]:3540              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:3702              *:*
  UDP    [::]:5004              *:*
  UDP    [::]:5005              *:*
  UDP    [::]:5355              *:*
  UDP    [::]:56388             *:*
  UDP    [::]:58202             *:*
  UDP    [::]:65233             *:*
  UDP    [::1]:1900             *:*
  UDP    [::1]:63232            *:*
  UDP    [fe80::4ce1:698:3975:4b52%19]:1900  *:*
  UDP    [fe80::4ce1:698:3975:4b52%19]:63231  *:*
  UDP    [fe80::c1fb:fd6c:3b4f:e706%18]:1900  *:*
  UDP    [fe80::c1fb:fd6c:3b4f:e706%18]:63230  *:*
  UDP    [fe80::e489:568:5861:ff99%14]:1900  *:*
  UDP    [fe80::e489:568:5861:ff99%14]:63229  *:*

ss

  • Voir les port ouverts
ss -ln
Recv-Q Send-Q                         Local Address:Port                           Peer Address:Port 
0      32                                         *:21                                        *:*     
0      128                                       :::22                                       :::*     
0      128                                        *:22                                        *:*     
0      100                                127.0.0.1:25                                        *:*     
  • avec les socket unix
ss -lnx
Netid Recv-Q Send-Q                       Local Address:Port                         Peer Address:Port 
u_str 0      0                     @/com/ubuntu/upstart 8465                                    * 0    
u_str 0      0          /var/run/dbus/system_bus_socket 10643                                   * 0    
u_str 0      0                           public/cleanup 10968                                   * 0    
u_str 0      0                           private/tlsmgr 10975                                   * 0    
u_str 0      0                          private/rewrite 10979                                   * 0    
u_str 0      0                           private/bounce 10983                                   * 0    
u_str 0      0                            private/defer 10987                                   * 0    
u_str 0      0                            private/trace 10991                                   * 0    
u_str 0      0                           private/verify 10995                                   * 0    
u_str 0      0                             public/flush 10999                                   * 0    
u_str 0      0                         private/proxymap 11003                                   * 0    
u_str 0      0                       private/proxywrite 11007                                   * 0    
u_str 0      0                             private/smtp 11011                                   * 0    
u_str 0      0                            private/relay 11015                                   * 0    
u_str 0      0                             public/showq 11019                                   * 0    
u_str 0      0                            private/error 11026                                   * 0    
u_str 0      0                            private/retry 11030                                   * 0    
u_str 0      0                          private/discard 11034                                   * 0    
u_str 0      0                            private/local 11038                                   * 0    
u_str 0      0                          private/virtual 11042                                   * 0    
u_str 0      0                             private/lmtp 11046                                   * 0    
u_str 0      0                            private/anvil 11051                                   * 0    
u_str 0      0                           private/scache 11056                                   * 0