How to FWMARK router local original traffic?

Hi,

I have set up my GL-iNet router with dual WAN connection, and create fwmark the traffic to with following iptables commands, and related ip rule and route tables

iptables -t mangle -A PREROUTING -i br-lan -m geoip ! --destination-country DE -j MARK --set-mark 0x2

Traffic from connected clients are successfully fwmark(ed) and correctly routed. However, the traffic originated from router itself could not be fwmark(ed), and only go to the primary link.

How to FWMARK router local original traffic?

Thanks Joseph

sorry for reply late.
To mark router local traffic, you can add rules to the OUTPUT chain.
iptables -t mangle -A OUTPUT -m geoip ! --destination-country DE -j MARK --set-mark 0x2