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 192.168.12.254 –tee
iptables -A POSTROUTING -t mangle -j ROUTE –gw 192.168.12.254 –tee

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

2 Comments

  1. Hi,

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

    Thanks

    Adeel

Leave a Reply to Sachin Cancel reply

Your email address will not be published.


*