no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tech:linux:useful_network_tools [2019/10/30 11:27] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Commonly Used Network Commands / Tools ====== | ||
| + | ===== Define DNS Servers ===== | ||
| + | Add/update DNS Server configurations in / | ||
| + | |||
| + | ===== LISTEN address list ===== | ||
| + | netstat Command to list LISTEN addresses (listening ports) | ||
| + | <code bash> | ||
| + | netstat -pnutl | ||
| + | netstat -pnutl | grep :80 | ||
| + | </ | ||
| + | |||
| + | |||
| + | Processes PID that opened tcp port 80 (run as root): | ||
| + | <code bash> | ||
| + | fuser 80/tcp | ||
| + | fuser -u -v 80/tcp | ||
| + | </ | ||
| + | Sample output: | ||
| + | < | ||
| + | 80/ | ||
| + | </ | ||
| + | |||
| + | Process name associated with PID # | ||
| + | <code bash>ls -l / | ||
| + | |||
| + | ===== Display Network Interface Statistics ===== | ||
| + | <code bash> | ||
| + | netstat -i | ||
| + | </ | ||
| + | |||
| + | ===== Create a LISTEN address ===== | ||
| + | nc Command to Create a service using bash script (to listen on port 8444 for example) | ||
| + | <code bash> | ||
| + | nc -k -l 8444 | ||
| + | </ | ||
| + | Keywords: Listener socket server bash bind TCP netcat\\ | ||
| + | Resources: [[http:// | ||
| + | |||
| + | |||
| + | ===== To send to a LISTEN address ===== | ||
| + | Target IP is the IP address of the server running '' | ||
| + | <code bash> | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Find systems without ping ===== | ||
| + | Some servers/ | ||
| + | <code bash> | ||
| + | arping -c1 -f -w1 192.168.1.1 | ||
| + | </ | ||
| + | ==== arping usage help ==== | ||
| + | < | ||
| + | Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination | ||
| + | -f : quit on first reply | ||
| + | -q : be quiet | ||
| + | -b : keep broadcasting, | ||
| + | -D : duplicate address detection mode | ||
| + | -U : Unsolicited ARP mode, update your neighbours | ||
| + | -A : ARP answer mode, update your neighbours | ||
| + | -V : print version and exit | ||
| + | -c count : how many packets to send | ||
| + | -w timeout : how long to wait for a reply | ||
| + | -I device : which ethernet device to use (eth0) | ||
| + | -s source : source ip address | ||
| + | destination : ask for what ip address | ||
| + | </ | ||
| + | |||
| + | ===== Find open ports ===== | ||
| + | nmap can be used to find open ports. | ||
| + | <code bash> | ||
| + | nmap 192.168.1.1 | ||
| + | </ | ||
| + | |||
| + | Also '' | ||
| + | < | ||
| + | nc -zv 192.168.1.100 80 | ||
| + | </ | ||
| + | |||
| + | On Windows | ||
| + | <code bat> | ||
| + | PowerShell | ||
| + | Test-NetConnection -ComputerName 192.168.1.21 -Port 22 | ||
| + | </ | ||



