Linux get tcpdump on port

 

tcpdump command used to get details of traffic on network.

To get tcp dump on port 8080 use following command:

$ tcpdump -i eth0 'port 8080'

To run tcpdump command root permission is must. So you need to log as root or use sudo to run above command.

It will display all traffic coming to port 8080 of eth0.

tcpudmp by default snarf’s 68 bytes of data from each packet. To snarf more data use -s option with tcpdump.

Example:

$ tcpdump -s 1000 -i eth0 'port 8080'
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s