How to capture data packets on a network using Wireshark (a. k. a. Ethereal)

Source: Internet
Author: User
Wireshark, formerly known as ethereal, is an amazing network monitoring tool. It helps you to capture the data packets being sent/received by your network interface and analyze it.
Warning:Before using Wireshark in promiscuous mode
Make sure that you have the required permissions to do so. promiscuous
Mode, in a way, is packet sniffing and might be able to get rid of
Job you currently have. (In simpler words, if you do not own the network
Or if you are not the network administrator then it can get you fired !)

Now, I am going to demonstrate this using my fedora 13 box as a client
(Kept in New Delhi, India) and will connect to an Ubuntu 10.04 Machine
(Kept in Florida, USA) Using SSH. Let us check it out step by step.

  1. Install the wireshark using your package manager. You need to install Wireshark as well as wireshark-gnome to get the GUI.Yum install Wireshark wireshark-gnome
  2. Launch the wireshark. Do not start the analysis yet. We will first switch off the promiscuous mode.
  3. Go to "capture" and select "options" and uncheck the "Capture packets in promiscuous mode" check box.
  4. Select the interface you want to listen to. I will listen to eth0,
    Which is usually the default for your first network interface. Also
    Specify a capture filter. Check out this list for complete filters and their formats. I will write "host <Ubuntu-maachine-IP-addess> ".
  5. You are all set but again before clicking start double check that promiscuous mode is turned off. Click Start.
  6. Connect to the Ubuntu server using the fedora box and the captured packets will be shown.
Filters are necessary if you want the capture to make some
Sense. Try it without any filter for once and you will be amazed
Seeing the number of packets which pass through your network interface
Card.
While I have warned you about the promiscuous mode, I encourage you
Use it on virtual machine but for learning purpose only (or if you
Happen to have a small switch or something then create a network
Yourself ).

 

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.