TCPDUMP -- how to monitor traffic between one machine in My LAN and one website.
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
TCPDUMP -- how to monitor traffic between one machine in My LAN and one website.
Hi All,
I have LAN of 12 machines, all are running redhat linux with private IP adresses in 192.168.1. series. This Lan is connected to public Internet through router which have a static public IP.
Now, I want to monitor all the traffic from one particular machine in LAN to one particular website. But I want to monitor the traffic using my system only but the traffic that originates from one particular machine(192.168.1.10) to www.google.com
Assume that my machine IP address is 192.168.1.5.
How can I make use of "tcpdump" utility for this purpose.
Can any one give the exact syntax of the "tcpdump" command for the above purpose.( I gave all the ip addresses and website name).
I'm not entirely sure if you can do that...i was looking for the exact same thing and i searched tmpdump's man pages but couldn't find anything....AFAIK, what you can do is route all traffic from that machine through yours, and then use tcpdump to monitor the traffic as its going through you...
But it would be good if there was a way to just sniff the network from your machine...?
seeings as tcpdump grabs every packet header...is there something that will grab the entire packet? or will this be a 3rd party program/script that needs to be installed?
I've never seen any entire packets being sent/recieved before (only the headers that tcpdump shows), shall be interesting
Btw, using tcpdump tcpdump | grep 192.168.0.25 | grep linuxquestions.org can also be done with a BPF filter:
tcpdump <args> -w <filename> 'host 192.168.0.25 and host linuxquestions.org' or if you already have a full dump: tcpdump <args> -r <tcp.dump> -w <filename> 'host 192.168.0.25 and host linuxquestions.org'. So the answer to your original question using BPF could be: tcpdump <args> 'src 192.168.1.10 and dst 216.239.53.98'.
*If you're seeing zilch on a switched LAN, then (if you own the LAN/have permission) you could try ettercap or another MITM/MAC flood tool.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.