I would like to know if there is a way in which I can create an interface in my Ubuntu 12.04 LTS Desktop for my router.
My Goal: I want to tcpdump
the ip address of the router which is 192.168.1.1.
new-eth1-for router HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.1.1 Bcast:192.168.1.255
eth0 Link encap:Ethernet HWaddr 00:22:68:36:aa:05
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
As you can see in the table above
My computer : 192.168.1.101
My router : 192.168.1.1
Localhost : 127.0.0.1 (I need it for MySQL and PHP)
I just want to know if there is a way to work this "monitoring" thing. If anybody has another suggestion or solution, please do not hesitate, I just want to hear a hint.
Thank you
My regards
No, this can't be done. Your router is a completely separate device. You'd have to have the tcpdump program, or similar, actually running on the router.
There are plenty of software router implementations, some of which may do this for you already.
http://en.wikipedia.org/wiki/List_of_router_or_firewall_distributions
Or, you may have a router that supports DD-WRT, which is Linux. You can install tcpdump on such installations.. here's an example.
http://emtunc.org/blog/04/2011/installing-tcpdump-on-dd-wrt-wrt54gl/