Networking Commands
Networking Commands
1. nmap:
nmap scanme.nmap.org
lsof -i TCP:22
iwconfig wlan0
6. dig:
dig example.com
route -n
telnet example.com 80
11. arp:
arp -a
ipconfig /all
12. or
ifconfig -a
traceroute google.com
curl https://www.example.com
wget https://www.example.com/file.txt
15. This command downloads a file from the specified URL
using HTTP, HTTPS, or FTP.
16. ssh:
ssh username@hostname
netstat -ano
ip addr show
iwconfig
19. This command displays wireless network interface
configuration.
20. nslookup:
nslookup example.com
lsof -i :port_number
ss -tulnp
route -n
27. This command displays the kernel routing table in a
numeric format.
28. telnet:
telnet example.com 22
ipconfig /flushdns
30. or
sftp username@hostname
sudo iptraf-ng
mtr google.com
34. This command combines the functionality of
traceroute and ping to provide detailed network diagnostics.
35. arping:
arping -c 3 192.168.1.1
route print
nsupdate -k /path/to/keyfile
host 8.8.8.8
curl -I https://www.example.com
nc -l -p 1234
traceroute -I google.com
nmap -O target_ip
sudo iptables -L
route print
57. ipset:
netstat -tuln
ss -t state established
traceroute -m 20 google.com
iperf3 -c server_ip
nc -l -p 1234
traceroute6 ipv6.google.com
nslookup 8.8.8.8
sudo ipfw add 100 fwd 192.168.1.2,80 tcp from any to any 8080
77. This command forwards incoming TCP traffic on port
8080 to port 80 of the specified IP address.
78. iptables with NAT:
79. This command scans the local network for live hosts
using ARP.
80. sshd with password authentication disabled:
ssh -X username@hostname
89. This command establishes an SSH connection with
X11 forwarding enabled for GUI applications.
90. netcat (nc) with UDP:
nc -u -l -p 1234
sudo ipfw add 100 allow tcp from any to any 8000-9000
95. This command scans the local network using the eth0
interface.
96. sshd with specific listening address:
nc -l -v -p 1234
sftp -v username@hostname
iperf3 -c server_ip -P 5
wget -q https://www.example.com/file.txt
nc -l -v -p 1234 -k
sudo ipfw add 100 allow tcp from any to any 22 log
109. This command allows TCP traffic on port 22 and logs it.
110. iptables with rate limiting:
111. This command scans the local network and saves the
results to a file named “scan_results.txt”.
112. sshd with specific listening port:
wget -N https://www.example.com/file.txt
ssh -X -o "ForwardX11Display=localhost:0"
username@hostname
121. This command establishes an SSH connection with
X11 forwarding and specifies the display.
122. netcat (nc) with verbose output and listening on
specific IP address:
nc -l -v -p 1234 -s 192.168.1.100
traceroute -w 2 google.com