User Tools

Site Tools


tips:port_mirror_commands

This is an old revision of the document!


Port Mirroring with iptables

This article provides the steps for configuring Port Mirroring with suitable commands. Port Mirroring is used to send a copy of packet to destination which was received on the interface depending on the configuration.

1. Commands to mirror

We need both inbound and outbound traffic, so using the commands,

iptables -t mangle -I PREROUTING -j TEE –gateway 10.20.0.129

“PREROUTING” is before routing decision happens

iptables -t mangle -I POSTROUTING -j TEE –gateway 10.20.0.129

“POSTROUTING” is after routing decision

tips/port_mirror_commands.1602669602.txt.gz · Last modified: 2020/10/14 15:30 by navaneeth