How to configure port mirroring on GL-AXT1800

I have the GL-AXT1800 with firmware 4.5.16, OpenWrt 21.02-SNAPSHOT so is not using nftables.

I need to duplicate TCP traffic from an inverter to a another PC to analyze some metrics. I've tried the following but does not work.

iptables -t nat -A PREROUTING -p tcp -s 192.168.9.151 -j DNAT --dport 9999 --to-destination <target_ip>

no errors - but nothing really happens

iptables -A PREROUTING -t mangle -p tcp --destination-port 9999 -j TEE --gateway <target_ip>
iptables v1.8.7 (legacy): unknown option "--gateway"

I've tried installing every iptables-mod-* there is to install as well as kmod-ipt-tee.

I've also tried the port-mirroring package but didn't help.

1 Like

why do you need the "port mirroring" function? to monitor calls? To be honest, sometimes I would really need this function, I suspect it wouldn't be easy, but maybe one of my friends from the forum will give me some advice or GL-iNet support will help.

I want to reformat the data it sends to its platform to another platform where I can perform more analysis.

It shouldn't be hard but for some reason it just doesn't work. Other have done it in fact but not on this specific model. Different method with Openwrt22.03/fw4 but regardless.

did you manage to do it?

Unfortunately not. Was hoping for the Openwrt 23 to do it with nftables so still waiting on the next firmware.