Linux Network Tools - yszheda/wiki GitHub Wiki

tcpdump

wireshark

non-root user

sudo usermod -a -G wireshark $USER

filter

frame.len
frame.number

time display format

tcpreplay

ss

《篡权的ss》-linux命令五分钟系列之三十一

$ ss -s
Total: 295 (kernel 312)
TCP:   48 (estab 1, closed 31, orphaned 0, synrecv 0, timewait 0/0), ports 13

Transport Total     IP        IPv6
*         312       -         -
RAW       0         0         0
UDP       2         2         0
TCP       17        12        5
INET      19        14        5
FRAG      0         0         0
$ ss -l
Recv-Q Send-Q           Local Address:Port               Peer Address:Port
0      128                         :::webcache                      :::*
0      128                         :::http                         :::*
0      128                         :::snapenetio                      :::*
0      128                          *:snapenetio                       *:*
0      50                           *:8531                          *:*
0      9                           :::ftp                          :::*
0      9                            *:ftp                           *:*
0      128                          *:ddi-tcp-1                       *:*
0      100                        ::1:smtp                         :::*
0      100                  127.0.0.1:smtp                          *:*
0      128                          *:8541                          *:*
0      128                  127.0.0.1:entextxid                       *:*
0      50                           *:12421                         *:*
0      10                           *:amqp                          *:*
0      128                          *:12521                         *:*
0      50                           *:mysql                         *:*
# sockets
$ ss -l
# TCP sockets
$ ss -ta
# UDP sockets
$ ss -ua
# RAW sockets
$ ss -wa
# UNIX sockets
$ ss -xa

ip

sar 监控

traceroute

DHCP

References

monitor 监控

bmon

nmap

ethtool

iperf

telnet

login without typing username and password

#!/usr/bin/expect

spawn "telnet" "the.host.machine"

expect "Login:"
send "youruser\r"
expect "Password:"
send "yourpassword\r"
expect "Login successful"
interact

netcat

nmap