Sample Header Ad - 728x90

How can I copy all traffic on a network and forward it to another IP address?

0 votes
1 answer
758 views
I'm trying to use iptables. I'm simulating a network with Mininet. I currently have a router connecting two subnets (10.0.1.1/24 and 10.0.2.1/24). If I use these two iptables rules on the router I see that two duplicates are created, but on the host 10.0.2.180 I only see echo request or reply packets (in the case of icmp ping). It seems that it is not bidirectional. The router only captures traffic traveling from one subnet to another, not internal traffic. I wrote this two rules on the router, but I can only catch inbound traffic. I would also need to take the outgoing traffic. I'm using this iptables rules: iptables -t mangle -A PREROUTING -i r1-eth1 -j TEE --gateway 10.0.2.180 iptables -t mangle -A POSTROUTING -o r1-eth1 -j TEE --gateway 10.0.2.180
Asked by Luigis94 (1 rep)
Dec 7, 2022, 10:08 PM
Last activity: Dec 12, 2022, 09:10 AM