What's new

Can switch be connected to the router WAN port?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

dieter

Senior Member
I would like to capture (using Wireshark) any and all traffic (incl. WiFi) of my LAN devices using port mirroring.

Is this doable by connecting a managed switch to the router WAN port and hooking up a computer to one of the other ports of the switch?

Dieter
 
You could do that provided your managed switch has the capability to do port mirroring.

Bear in mind that all the traffic to or from the router will have the router's WAN IP address. i.e. you will not see LAN IP addresses.
 
What about MAC addresses? Would I be able to trigger on MAC addresses of traffic coming from/going to devices on the LAN?
 
If you're only interested in WAN to LAN traffic (and vice versa), rather than LAN to LAN you could use netfilter's TEE command on the router.

http://ipset.netfilter.org/iptables-extensions.man.html#lbDU

For example:
Code:
modprobe xt_TEE
iptables -t mangle -A PREROUTING  -s 192.168.1.10 -j TEE --gateway 192.168.1.238
iptables -t mangle -A POSTROUTING -d 192.168.1.10 -j TEE --gateway 192.168.1.238
This will send cloned packets of 192.168.1.10 traffic to 192.168.1.238.
 
Also depending on your WAN, your router will need to be fast enough and link speed too. If you are just receiving, you will need 2x the bandwidth in 1 direction (sending+ receiving) otherwise you can just apply filters (switches/routers some can use filters for this).

Its 1 reason i love my CCR with 36 cores i have plenty of CPU to even run sniffing and filters on the CCR itself, and even do bandwidth testing from the CCR.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top