Port mirroring using iptables on ddwrt.

If you use ddwrt and have snort/snorby in your home network on a different machine and would like port mirroring using iptables, you can send all logging this way.

iptables -A PREROUTING -t mangle -j ROUTE –gw –tee
iptables -A POSTROUTING -t mangle -j ROUTE –gw –tee

12.254 is the machine where you do a copy forward all packets


  1. Hi,

    both the lines have the same ip address. 12.254, can you please specify which is which.



Leave a comment

Your email address will not be published.