Capture packets on Asus router

Posted on

Problem :

I have Asus RT-AC87U router in my home network. I would like to analyse packets on specific ports like Wireshark does. Is it possible to build such system that could make traffic going trough router analysis? How?

Solution :

First things first, you need to enable ssh access on your router. Someone asked a question regarding this here

Once you have your ssh setup done, you can connect to your user via SSH using a Linux VM or Putty or any other tool that supports ssh. You can then use the tcpdump utility to scan packets. Example of tcpdump commands :

Scan on all interfaces (-i any) any traffic that has source or desto as 123.123.123.123
tcpdump -i any host 123.123.123.123

Scan on interface eth0 for any traffic going through port 443
tcpdump -i eth0 port 443

Let me know if you need help with the tcpdump utility.

If you use stock firmware, you first need to setup Entware following this guide:
https://github.com/Entware/Entware/wiki/Install-on-Asus-stock-firmware

And then you can install tcpdump with:

opkg install tcpdump

Leave a Reply

Your email address will not be published. Required fields are marked *