I have a Pi 3B+ that I want to use to monitor traffic forwarded from the router to another host (and a specific port) on the network.

I am currently using the ethernet interface on the Pi to connect directly to that other host to be able to send a WOL command to it. I am using the WiFi interface on the Pi to connect to the internet and also communicate with other devices on the network. I don't have any other interfaces (WiFi dongle, etc.)

I can't use the WiFi interface as an AP because it won't be able to communicate with the other devices on the network.

I don't want to use the Pi as a gateway/access point to monitor the other host because I don't want to throttle the other hosts speeds.

I was told in this post that I could use iptables to accomplish this but all the tutorials I find talk about setting up the Pi as an access point or using MITM which I do not want to do.

So is it possible to use the Pi to check (using iptables, or possibly another service) to see if there is data being forwarded from the router to the other host on a specific port while allowing the other host to be directly connected to the router without anything (esp. the Pi) in between?

I've tried tcpdump but it doesn't seem to be returning any TCP port results, only UDP as well as ARP requests.

UPDATE: The other host is a Windows machine that I have full access to (so I should be able to configure the interfaces on it). It is connected to the router via WiFi, like the Pi, and has an Ethernet interface that the Pi is connected to to allow the Pi to send a WOL packet to it. My router is in a different room and I don't have ethernet jacks between the two rooms, so I can't connect to the router via Ethernet.

  • How is the other host connected to the router? Do can configure the network interfaces on the other host?
    – Ingo
    Dec 1, 2020 at 18:45
  • You should split the question into two questions: this one for sniffing and if getting a solution, another question for the trigger.
    – Ingo
    Dec 1, 2020 at 18:53
  • @Ingo Thanks for the suggestion, I've removed the parts about the trigger.
    – MattR
    Dec 1, 2020 at 22:55
  • @Ingo Both hosts (the Pi and the one I want to monitor) are connected to the router via WiFi. I don't currently have a good method of connecting the other host to the router via Ethernet because it's in a different room and I don't have any ethernet jacks unfortunately. I assume I can configure the interfaces on the other host. It's a Windows machine.
    – MattR
    Dec 1, 2020 at 22:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.