* Packet Sniffing on Intermediate Nodes
@ 2021-05-10 16:32 Ajay Garg
2021-05-10 17:46 ` Ajay Garg
0 siblings, 1 reply; 2+ messages in thread
From: Ajay Garg @ 2021-05-10 16:32 UTC (permalink / raw)
To: netdev
Hi All,
I have been playing around with sniffing packets, using raw sockets.
Following is my setup :
* Machine-1 (Sender), with IP 1.2.3.4
* Machine-2 (Intermediate), with IP 5.6.7.8
* Machine-3 (Receiver), with IP 9.10.11.12
The packet-path is Machine-1 <=> Machine-2 <=> Machine-3.
I have an agent installed, one each on all the 3 machines,
communicating on port 12345.
Following is what I have accomplished so far :
1.
I have been able to do communication over raw-sockets.
Most importantly, Machine-3 (Receiver) is able to receive the packets
from Machine-1, via raw-socket paradigm.
2.
Now, raw sockets in general accept all packets.
So, the next step was to apply socket-flitering, so that only packets
intended for port 12345 are received on Machine-3 agent.
This was accomplished via the help from
https://www.kernel.org/doc/Documentation/networking/filter.txt
3.
Now, I intend to sniff packets on Machine-2 (the intermediate node).
Is there a normal / legal way to do this?
Would be grateful for any pointers.
Thanks and Regards,
Ajay
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Packet Sniffing on Intermediate Nodes
2021-05-10 16:32 Packet Sniffing on Intermediate Nodes Ajay Garg
@ 2021-05-10 17:46 ` Ajay Garg
0 siblings, 0 replies; 2+ messages in thread
From: Ajay Garg @ 2021-05-10 17:46 UTC (permalink / raw)
To: netdev
I think my question might be unneeded.
Machine-2 would likely pick up the packets destined for Machine-3,
because of promiscuity.
On Mon, May 10, 2021 at 10:02 PM Ajay Garg <ajaygargnsit@gmail.com> wrote:
>
> Hi All,
>
> I have been playing around with sniffing packets, using raw sockets.
>
> Following is my setup :
>
> * Machine-1 (Sender), with IP 1.2.3.4
> * Machine-2 (Intermediate), with IP 5.6.7.8
> * Machine-3 (Receiver), with IP 9.10.11.12
>
> The packet-path is Machine-1 <=> Machine-2 <=> Machine-3.
> I have an agent installed, one each on all the 3 machines,
> communicating on port 12345.
>
> Following is what I have accomplished so far :
>
> 1.
> I have been able to do communication over raw-sockets.
> Most importantly, Machine-3 (Receiver) is able to receive the packets
> from Machine-1, via raw-socket paradigm.
>
> 2.
> Now, raw sockets in general accept all packets.
> So, the next step was to apply socket-flitering, so that only packets
> intended for port 12345 are received on Machine-3 agent.
>
> This was accomplished via the help from
> https://www.kernel.org/doc/Documentation/networking/filter.txt
>
> 3.
> Now, I intend to sniff packets on Machine-2 (the intermediate node).
>
> Is there a normal / legal way to do this?
> Would be grateful for any pointers.
>
>
> Thanks and Regards,
> Ajay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-10 17:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 16:32 Packet Sniffing on Intermediate Nodes Ajay Garg
2021-05-10 17:46 ` Ajay Garg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.