net.rst
changeset 2160 d531941f084d
parent 2159 e34db1f233fe
child 2161 44ad8ff65756
equal deleted inserted replaced
2159:e34db1f233fe 2160:d531941f084d
    67 
    67 
    68 List of NetBIOS name::
    68 List of NetBIOS name::
    69 
    69 
    70   $ nbtstat -r
    70   $ nbtstat -r
    71 
    71 
    72 List of open ports.
    72 List of open ports
    73 ===================
    73 ==================
    74 
    74 
    75 List of open ports under Windows.
    75 List of open ports under Windows::
    76 ---------------------------------
       
    77 ::
       
    78 
    76 
    79   cmd> netstat        # with DNS name resolution, TCP only
    77   cmd> netstat        # with DNS name resolution, TCP only
    80   cmd> netstat -n     # without name resolution, TCP only
    78   cmd> netstat -n     # without name resolution, TCP only
    81   cmd> netstat -a -n  # TCP and UDP
    79   cmd> netstat -a -n  # TCP and UDP
    82   cmd> netstat -s     # show IP, ICMP, TCP, and UDP statistics.
    80   cmd> netstat -s     # show IP, ICMP, TCP, and UDP statistics.
    83 
    81 
    84 List of open ports under Linux.
    82 List of open ports under Linux::
    85 -------------------------------
       
    86 
       
    87 ``-t`` tcp, ``-u`` udp, ``-l`` local, ``-p`` process::
       
    88 
    83 
    89   $ sudo netstat -tulp
    84   $ sudo netstat -tulp
       
    85 
       
    86 where ``-t`` tcp, ``-u`` udp, ``-l`` local, ``-p`` process.
    90 
    87 
    91 or to use port number instead of protocol name::
    88 or to use port number instead of protocol name::
    92 
    89 
    93   $ sudo netstat -tulpn
    90   $ sudo netstat -tulpn
    94 
    91 
    95 Which processes open port?
    92 Which processes open port
    96 ==========================
    93 =========================
    97 
    94 
    98 Windows
    95 Windows::
    99 -------
       
   100 ::
       
   101 
    96 
   102   cmd> netstat -o     # show PID
    97   cmd> netstat -o     # show PID
   103   cmd> netstat -b     # show also cmd name
    98   cmd> netstat -b     # show also cmd name
   104   cmd> netstat -b -v  # show all modules (.exe and .dll) with full path
    99   cmd> netstat -b -v  # show all modules (.exe and .dll) with full path
   105 
   100 
   106 Linux.
   101 Linux::
   107 ------
       
   108 ::
       
   109 
   102 
   110   $ sudo netstat -tulpn
   103   $ sudo netstat -tulpn
   111 
       
   112 or::
       
   113 
       
   114   $ sudo lsof -i
   104   $ sudo lsof -i
   115 
   105 
   116 How disable IPv6?
   106 How disable IPv6?
   117 =================
   107 =================
   118 
   108