Updated on 28th Mars 2014, thanks Imran Hayder for suggestions!
In some cases you may need to run wireshark on remote machine, especially if you want to in depth to understand what is going on.
Without any further blah blah, amusing you are using Ubuntu here is how to:
Without any further blah blah, amusing you are using Ubuntu here is how to:
- Create EBS, make sure to un-check "delete on termination"
- Create and start Ubuntu 12.04 EC2
- Log in to it
- Check disk name
- Format disk
- Create mount directory
- Mount disk
- Make wireshark folder
- Install wireshark
- Run example
- Copy file to local
sudo fdisk -l
sudo mkfs -t ext4 /device/path
sudo mkdir /home/data-storage
sudo mount /dev/DEVICE /home/data-storage
sudo mkdir /home/data-storage/wireshark #important change ownership! sudo chown root:ubuntu /home/data-storage/wireshark #allow group to read sudo chmod -R 774 wireshark
sudo apt-get install wireshark tshark
sudo su cd /home/data-storage/wireshark #tshark will capture eth0 for 10 seconds and save file to my.pcap tshark -i eth0 -a duration:10 -w my.pcap
#from your local machine, note intentional line brake due to layout of the blog. cd wireshark scp -i your.pem ubuntu@your_ec2_dns.compute.amazonaws.com:/path-to/my.pcap .