Use of tcpdump, the latest Linux packet capture tool

Source: Internet
Author: User

Use of tcpdump, the latest Linux packet capture tool
System

Centos6.5

Procedure
  • The default system does not follow tcpdump and cannot be used directly. Therefore, you need to install
    Installation command: yum install-y tcpdump
  • Generally, our server has only one Nic, and tcpdump can be used to capture data packets directly. However, it is too troublesome, so we will add parameters for obtaining.
    For example, intercept data between the host (192.168.30.122) and host 120.110.111.101.
    Tcpdump-n-I eth0 host 192.168.30.122 and 120.110.111.101
  • The following format can be used to intercept all data on the server:
    Tcpdump-n-I eth0 dst 192.168.30.122
    Or the server has multiple ip addresses that can use parameters.
    Tcpdump-n-I eth0 dst 192.168.30.122 or 192.168.30.120
    The following format is used to capture all TCP packets entering the server. For details, refer
    Tcpdump-n-I eth0 dst 192.168.31.147 or 192.168.31.157 and tcp
    Data packets from the Local Machine
    Tcpdump-n-I eth0 src 192.168.31.147 or 192.168.31.157
    Tcpdump-n-I eth0 src 192.168.31.147 or 192.168.31.157 and port! 22 and tcp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.