Howto install tcpdump on Centos 7.x and RHEL

Howto install tcpdump on Centos 7.x and RHEL

CentOS

Tcpdump is package capture command which helps us to troubleshooting and sniffer packages on Centos and RHEL.

Step 1: Install tcpdump by yum command

[root@IThelpblog ~]# yum install tcpdump
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.vonline.vn
* epel: mirror01.idc.hinet.net
* extras: mirrors.vonline.vn
* updates: mirror.nus.edu.sg
Resolving Dependencies
–> Running transaction check
—> Package tcpdump.x86_64 14:4.5.1-3.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================
Installing:
tcpdump x86_64 14:4.5.1-3.el7 base 387 k

Transaction Summary
=================================================================================================================================================================
Install 1 Package

Total download size: 387 k
Installed size: 931 k
Is this ok [y/d/N]: y
Downloading packages:
tcpdump-4.5.1-3.el7.x86_64.rpm | 387 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 14:tcpdump-4.5.1-3.el7.x86_64 1/1
Verifying : 14:tcpdump-4.5.1-3.el7.x86_64 1/1

Installed:
tcpdump.x86_64 14:4.5.1-3.el7

Complete!
[root@IThelpblog ~]#

Step 2: Listen tcpdump and see real packet capture on specific port

[root@IThelpblog~]# tcpdump port 22

 

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>