This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:cmd:ip [2017/09/27 09:12] – created js | linux:cmd:ip [2020/10/28 16:05] (current) – js | ||
---|---|---|---|
Line 4: | Line 4: | ||
<code bash> | <code bash> | ||
- | ==== disable eth ==== | + | ===== disable eth ===== |
<code bash>ip link set eth2 down</ | <code bash>ip link set eth2 down</ | ||
+ | |||
+ | ===== show services of port ===== | ||
+ | <code bash> | ||
+ | |||
+ | ===== show all listen ports ===== | ||
+ | <code bash> | ||
+ | < | ||
+ | Active Internet connections (only servers) | ||
+ | Proto Recv-Q Send-Q Local Address | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 192.168.122.1: | ||
+ | tcp 0 0 172.16.0.2: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 0.0.0.0: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 0.0.0.0: | ||
+ | tcp 0 0 0.0.0.0: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp 0 0 0.0.0.0: | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | udp 0 0 0.0.0.0: | ||
+ | udp 0 0 0.0.0.0: | ||
+ | udp 0 0 0.0.0.0: | ||
+ | udp 0 0 0.0.0.0: | ||
+ | udp 0 0 192.168.122.1: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | < | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | udp UNCONN | ||
+ | </ | ||
+ | ===== check ports with nmap ===== | ||
+ | <code bash> | ||
+ | < | ||
+ | NSE: Loaded 23 scripts for scanning. | ||
+ | Initiating ARP Ping Scan at 16:24 | ||
+ | Scanning 172.16.0.1 [1 port] | ||
+ | Completed ARP Ping Scan at 16:24, 0.24s elapsed (1 total hosts) | ||
+ | Initiating Parallel DNS resolution of 1 host. at 16:24 | ||
+ | Completed Parallel DNS resolution of 1 host. at 16:24, 0.00s elapsed | ||
+ | Initiating SYN Stealth Scan at 16:24 | ||
+ | Scanning ubnt.lab.schnuerle.com (172.16.0.1) [1000 ports] | ||
+ | Discovered open port 80/tcp on 172.16.0.1 | ||
+ | Discovered open port 443/tcp on 172.16.0.1 | ||
+ | Discovered open port 53/tcp on 172.16.0.1 | ||
+ | Discovered open port 22/tcp on 172.16.0.1 | ||
+ | Completed SYN Stealth Scan at 16:24, 1.36s elapsed (1000 total ports) | ||
+ | Initiating Service scan at 16:24 | ||
+ | Scanning 4 services on ubnt.lab.schnuerle.com (172.16.0.1) | ||
+ | Completed Service scan at 16:24, 12.47s elapsed (4 services on 1 host) | ||
+ | NSE: Script scanning 172.16.0.1. | ||
+ | Nmap scan report for ubnt.lab.schnuerle.com (172.16.0.1) | ||
+ | Host is up, received arp-response (0.0014s latency). | ||
+ | Not shown: 996 closed ports | ||
+ | Reason: 996 resets | ||
+ | PORT STATE SERVICE | ||
+ | 22/ | ||
+ | 53/ | ||
+ | 80/ | ||
+ | 443/tcp open ssl/http syn-ack lighttpd | ||
+ | MAC Address: B4: | ||
+ | Service Info: OS: Linux; CPE: cpe:/ | ||
+ | |||
+ | Read data files from: / | ||
+ | Service detection performed. Please report any incorrect results at http:// | ||
+ | Nmap done: 1 IP address (1 host up) scanned in 14.60 seconds | ||
+ | Raw packets sent: 1088 (47.856KB) | Rcvd: 1090 (43.674KB) | ||
+ | </ | ||
+ | |||
+ | ===== UDP nmap scan ===== | ||
+ | <code bash> | ||
+ | |||
+ | ===== nmap with OS detection ===== | ||
+ | <code bash> | ||
+ | |||
+ | |||
+ | ====== Links ======= | ||
+ | [[https:// |