Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:cmd:ip [2020/10/28 15:37] jslinux:cmd:ip [2020/10/28 16:05] (current) js
Line 1: Line 1:
 ====== ip commands ====== ====== ip commands ======
  
-==== ifconfig ====+===== ifconfig =====
 <code bash>ifconfig</code> <code bash>ifconfig</code>
  
-==== disable eth ====+===== disable eth =====
 <code bash>ip link set eth2 down</code> <code bash>ip link set eth2 down</code>
  
-==== show services of port ====+===== show services of port =====
 <code bash>getent services <port></code> <code bash>getent services <port></code>
  
-==== show all listen ports ====+===== show all listen ports =====
 <code bash>netstat -lnput</code> <code bash>netstat -lnput</code>
 <code>[root@srv]# netstat -lnput <code>[root@srv]# netstat -lnput
Line 48: Line 48:
 </code> </code>
  
-==== check ports with nmap ====+<code bash>sudo ss -tulwn</code> 
 +<code>Netid  State      Recv-Q Send-Q                      Local Address:Port                                     Peer Address:Port 
 +udp    UNCONN          0                                       *:50001                                               *:* 
 +udp    UNCONN          0                                       *:973                                                 *:* 
 +udp    UNCONN          0                                       *:5353                                                *:* 
 +udp    UNCONN          0                                       *:34776                                               *:* 
 +udp    UNCONN          0                           192.168.122.1:53                                                  *:* 
 +udp    UNCONN          0                              172.16.0.2:53                                                  *:* 
 +udp    UNCONN          0                               127.0.0.1:53                                                  *:* 
 +udp    UNCONN          0                                *%virbr0:67                                                  *:* 
 +udp    UNCONN          0                                       *:111                                                 *:* 
 +udp    UNCONN          0                  [::ffff:192.168.122.1]:47422                                            [::]:* 
 +udp    UNCONN          0                                    [::]:973                                              [::]:* 
 +udp    UNCONN          0                                    [::]:5353                                             [::]:
 +udp    UNCONN          0                     [::ffff:172.16.0.2]:50500                                            [::]:* 
 +</code> 
 +===== check ports with nmap =====
 <code bash>nmap -Pn -sV --version-all --reason -v 172.16.0.1</code> <code bash>nmap -Pn -sV --version-all --reason -v 172.16.0.1</code>
 <code>Starting Nmap 6.40 ( http://nmap.org ) at 2020-10-28 16:24 CET <code>Starting Nmap 6.40 ( http://nmap.org ) at 2020-10-28 16:24 CET
Line 85: Line 101:
            Raw packets sent: 1088 (47.856KB) | Rcvd: 1090 (43.674KB)            Raw packets sent: 1088 (47.856KB) | Rcvd: 1090 (43.674KB)
 </code> </code>
 +
 +===== UDP nmap scan =====
 +<code bash>nmap -Pn -sU -sV --version-all --reason -v 172.16.0.1</code> 
 +
 +===== nmap with OS detection =====
 +<code bash>nmap -Pn -sS -sV --version-all --reason -v -A -O --osscan-guess -p0-65535 172.16.0.1</code>
 +
 +
 +====== Links =======
 +[[https://www.kuketz-blog.de/nmap-systeme-auf-offene-ports-scannen/]]