Quick and Silent Gigabit Packet Interception
I regularly find myself inspecting traffic on Linux systems. Usually I'm already on the client or server when doing this (such as when diagnosing weird low level app behavior, or unknown, or unusual traffic). It has been a while since I've needed to silently be the wire between two black boxes.
While verifying link level information about bypassing my Google Fiber Network Box I needed to be that wire again. Before I connected any wires to anything I needed to be sure I wouldn't accidentally leak traffic as I wasn't sure what would impact the link.
You'll need a Linux computer with two gigabit ethernet ports. My last two laptops haven't had any built in ethernet ports, but USB gigabit adapters are cheap and I already had a bunch.
I went through and disabled the services that would configure network interfaces (NetworkManager and ModemManager) as well as all of the networking services on my system, and confirming your firewalls are all going to allow the traffic through.
I double checked no packets were sent out up on link up by listening on each respective interface, plugging in to a powered but otherwise disconnected switch, and bringing the interface up.
Once I'd verified everything in one root terminal I ran:
In another terminal either as root, or as a user in the "wireshark" group begin recording the traffic of interest:
|
|
At this point, connect the cables between the two boxes of interest. When ready bring the links up:
Welcome to being the wire.
bd9e1ab3 @ 2024-07-14