Table of Contents

PCEngines APU2 - iptables tee / clone packets

From the manual: The TEE target will clone a packet and redirect this clone to another machine on the local network segment. In other words, the nexthop must be the target, or you will have to configure the nexthop to forward it further if so desired.

If you don't have a switch with mirror / span ports, you can use iptables to clone the packets to another machine on the same subnet. That monitor box needs to be on the same layer 2 network, and it needs to be reachable by IP address.

Overview

 PC Engines APU2

+-------------------------------------------------------+
|    --------   ------   ------   ------ [---]          |
| O  \Serial/   |NIC1|   |NIC2|   |NIC3| [---]  O  O    |
|     ------    ---|--   ---|--   ---|--                |
+------------------|--------|--------|------------------+
       10.1.1.5/24 |      | |        | |
                   /      +-|--------|-+   
                  /         | Bridge |
                 /          |        |
    10.1.1.6/24 /           |         \
      +-------------+       |          \
      | Monitor box |      WAN         LAN
      +-------------+

Debian 9 (stretch) example