Tcpdump is a free command based tool for capturing and analyzing a receiving/sending data packets. tcpdump will work on all the unix based operating systems like Ubuntu, Fedora, Redhat, CentOS, Debian, etc. tcpdump can capture the packets and write into a file.
Install tcpdump (Ignore if installed)
[root@server !]# yum -y install tcpdump
OR
user@server:~$ sudo apt-get install tcpdump
tcpdump commands
Monitor all the sending and receiving packets/protocols
[root@server !]# tcpdump
Monitor ICMP protocol on interface eth0
[root@server !]# tcpdump -i eth0 icmp
Monitor port 80/TCP on network interface eth0
[root@server !]# tcpdump -i eth0 -p tcp port 80
Monitor UDP ports
[root@server !]# tcpdump -i eth0 -p udp
Capture the tcpdump packets data into a log file
[root@server !]# tcpdump -i eth0 -p tcp port 80 -w captured.log
Read a captured log file
[root@server !]# tcpdump -r captured.log
Install tcpdump (Ignore if installed)
[root@server !]# yum -y install tcpdump
OR
user@server:~$ sudo apt-get install tcpdump
tcpdump commands
Monitor all the sending and receiving packets/protocols
[root@server !]# tcpdump
Monitor ICMP protocol on interface eth0
[root@server !]# tcpdump -i eth0 icmp
Monitor port 80/TCP on network interface eth0
[root@server !]# tcpdump -i eth0 -p tcp port 80
Monitor UDP ports
[root@server !]# tcpdump -i eth0 -p udp
Capture the tcpdump packets data into a log file
[root@server !]# tcpdump -i eth0 -p tcp port 80 -w captured.log
Read a captured log file
[root@server !]# tcpdump -r captured.log
0 comments:
Post a Comment