Trying to understand the TEE
module of iptables.
Intend is trying to clone and send the same packet to 2 IPs
Tried the following
iptables -A INPUT -P tcp --dport 2003 -j TEE --gateway IP1
iptables -A INPUT -P tcp --dport 2003 -j TEE --gateway IP2
Does this tee
the traffic to both gateways or only the 1st rule?
running the command iptables -L -v
shows the rules and packets getting counted against the rule.
Also saw commands with -t mangle like
iptables -t mangle -A PREROUTING -P tcp --dport 2003 -j TEE --gateway IP1
Running the command iptables -L
doesn't show prerouting values but I can see it in iptables -S
In any of the cases, this didn't seem like it was forwarding the packets to the said IP1 (on the same network). Running a TCP dump on the macing with IP1 could not show any data coming in.
Also any nice article on understanding IPTABLES for Dummies ...Official docs well went above my head :/