![]() ![]() Iptables -t mangle -A POSTROUTING -o pppoe-wan -s 192.168.1.0/24 -j TEE -gateway 192.168.1.238īoth rules are included in the POSTROUTING chain of the mangle table, though it need not be that way since equivalent rules which do the same thing could also be written in the FORWARD chain. On the router, the rules to achieve this are: iptables -t mangle -A POSTROUTING -o br-lan ! -s 192.168.1.0/24 -j TEE -gateway 192.168.1.238 We just need rules for mirroring any incoming traffic destined towards the LAN network, and any outgoing traffic originating from the same network towards the WAN interface. Using the iptables' TEE extension, port mirroring is an easy feat. As I do not have a hub, I opted for the first option. Alternatively, we could have a hub (NOTE: not switch) between the router's WAN port and the Raspberry Pi, allowing the latter to sniff all ethernet frames to and from the modem indiscriminately. Then, configure the router to duplicate/mirror any traffic to it towards the Raspberry Pi (via port mirroring). Flash memory usage and capacity of the router.īasically, the main idea is to have the Raspberry Pi hooked up to one of the router's LAN switch port via ethernet. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |