Skip to content
Contents
GuidesOpenWrt

OpenWrt TPROXY stops after reboot. How do I keep the IPv4 rule and local route?

If manual routes restore your proxy, save two lines while it works. The rule selects a table for marked IPv4 packets. The local route delivers them to this host.

If manual routes restore your proxy, save two lines while it works. The rule selects a table for marked IPv4 packets. The local route delivers them to this host.

Match the working setup

This assumes transparent listening and marking already work. Substitute your table for 100. If a plugin owns these entries, edit it there to avoid duplicates.

ip -4 rule show
ip -4 route show table 100

Back up /etc/config/network and keep local access. Check priority 10010, the low mark bit and dedicated table 100 against your working values and other users such as multi-WAN. Adapt and append both sections to that file. Reload over SSH. The session may drop.

config rule 'proxy_lookup'
        option priority '10010'
        option mark '0x1/0x1'
        option lookup '100'

config route 'proxy_local'
        option interface 'loopback'
        option type 'local'
        option target '0.0.0.0/0'
        option table '100'
/etc/init.d/network reload

Compare before and after reboot

Run these checks first. If correct, reboot during maintenance, reconnect and repeat. The screenshot shows an OpenWrt 25.12.6 x86/64 VM after reboot.

uci show network.proxy_lookup
uci show network.proxy_local
ip -4 rule show
ip -4 route show table 100

OpenWrt 25.12.6 · SSH · fwmark 0x1/0x1 · table 100

Look for 10010: from all fwmark 0x1/0x1 lookup 100 and local default dev lo scope host. If only UCI has the entries, check logread -e netifd. If only the route is missing, check interface state with ifstatus loopback. Keep this local default out of the main table.

Both entries survived. What next?

The image verifies persistence only. Check marking and proxy egress exemptions with nft list ruleset. Open two fresh client connections. Confirm the proxied target in the proxy log and the expected exit for direct traffic. Test IPv6 separately.

If traffic loops, undo any new marking, restore the backup and repeat the reload command. Verify the original exit. With multiple WANs, also check traffic policies.

Verify mwan3 failover and per-connection balancing across two WANs

Explore hardware

Comments