You can use Wireshark to monitor packets moving over various interfaces on an OpenWRT router.
Setup
On the router:
- Install
tcpdump- Go to OpenWRT ⇒ LuCI ⇒ System ⇒ Software
- Update Lists
- Search for and install
tcpdump
- Ensure you can SSH into the router
SSH authentication
Setting up an SSH key is a much more secure way to do this. While OpenWRT allows password logins by default, you’ll have to pass your password around in plaintext unless you set up a key.
On your local machine:
- Install Wireshark
- If necessary, make sure the
sshdumpfeature is enabled - Make sure you can run wireshark as the user you can SSH into the router from
- If necessary, make sure the
Usage
- Launch Wireshark as the user you SSH into the router from
- Select the settings gear icon next to
SSH remote capture: sshdumpin the interface list - In the Server page:
- Set “Remote SSH server address” ⇒ the router’s IP address
- Confirm “Remote SSH server port” ⇒ 22
- In the Authentication page:
- Set “Remote SSH server username” ⇒
root - Click
...by “Path to SSH private key”- Browse to and select the private SSH key file you use to authenticate
- Set “Remote SSH server username” ⇒
- In the Capture page:
- Set “Remote interface” as needed
- Set “Remote capture command selection” ⇒
tcpdump - Set “Gain capture privilege on the remote machine” ⇒
none
- Check “Save parameters on capture start”
- Click Start