0Pricing
Linux Command Line Mastery · บทเรียน

การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump

เติมเต็มชุดเครื่องมือเครือข่ายและความปลอดภัยด้วยการจับแพ็กเก็ตแบบสดและใช้ตัวกรองด้วย tcpdump เพื่อวินิจฉัยปัญหาการเชื่อมต่อและความปลอดภัย

การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump เป็นบทเรียน Linux Command Line Mastery ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Linux Command Line Mastery และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Linux Command Line Mastery มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Seeing the Wire

Diagnostics like ping and dig tell you whether something works, but sometimes you need to see the actual packets. tcpdump captures network traffic in real time.

Listing Interfaces

First find which interface to listen on with -D. Common names are eth0, wlan0, or en0.

sudo tcpdump -D

A Basic Capture

-i selects the interface. Capturing requires root because it reads raw packets.

sudo tcpdump -i eth0

Limiting the Capture

-c stops after N packets so the terminal does not flood, useful for a quick look.

sudo tcpdump -i eth0 -c 10

Filtering by Host

Capture filters narrow the noise. host limits to traffic to/from one address.

sudo tcpdump -i eth0 host 8.8.8.8

Filtering by Port

Use port to focus on a service. Here we watch only HTTPS traffic.

sudo tcpdump -i eth0 port 443

Combining Filters

Filters combine with and, or, not for precise targeting.

sudo tcpdump -i eth0 tcp and port 22 and not host 10.0.0.1

Readable Output Flags

-n skips DNS lookups (faster, shows IPs), and -v adds detail. -A prints packet payloads as ASCII.

sudo tcpdump -i eth0 -nv port 80

Saving to a File

-w writes raw packets to a .pcap file you can analyze later, e.g. in Wireshark.

sudo tcpdump -i eth0 -w capture.pcap

Reading a Capture

-r replays a saved capture, and you can still apply filters while reading.

tcpdump -r capture.pcap port 443

Security Use Cases

tcpdump helps spot unexpected outbound connections, confirm a firewall rule is blocking traffic, or verify that sensitive data is encrypted on the wire.

Quick Check

What does the -w option do in tcpdump?

Recap

You can now inspect live traffic:

  • -i picks the interface, -c limits count
  • Filters: host, port, combined with and/or/not
  • -n/-v/-A shape output
  • -w saves and -r reads .pcap files

tcpdump turns invisible packets into a debuggable stream.

คำถามที่พบบ่อย

บทเรียน “การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Linux Command Line Mastery ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Linux Command Line Mastery มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump”

เติมเต็มชุดเครื่องมือเครือข่ายและความปลอดภัยด้วยการจับแพ็กเก็ตแบบสดและใช้ตัวกรองด้วย tcpdump เพื่อวินิจฉัยปัญหาการเชื่อมต่อและความปลอดภัย คุณปฏิบัติ Linux Command Line Mastery ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Linux Command Line Mastery หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Linux Command Line Mastery บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน

บทเรียน “การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Linux Command Line Mastery นี้ได้ไหม

ได้ บทเรียน Linux Command Line Mastery ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การวินิจฉัยเครือข่าย: `traceroute`, `nslookup`, `dig`
  2. การจัดการไฟร์วอลล์: `ufw`, `firewalld`, `iptables`
  3. การจัดการคีย์ Secure Shell
  4. การจับและตรวจสอบปริมาณการรับส่งข้อมูลด้วย tcpdump
← กลับไปที่ Linux Command Line Mastery