I want to report a bug for my ASUS RT-N16 on weekly build. (since stable build break some feature I want)
Modal: ASUS RT-N16
Related Firmware: tomato-K26USB-1.28.9055MIPSR2-git-13042011-vpn3.6 & tomato-K26USB-1.28.9055MIPSR2-git-13042011-gcc-4.4.6-Ext
Problem: Reboot abnormally
I need to redirect all tcp port 80 traffic to tun0 (OpenVPN).
(Assume that OpenVPN is already up at tun0, gateway is 10.0.0.1 and WAN is already up and fully configured.)
ip route flush table 100 ip route add default via 10.0.0.1 dev tun0 table 100 ip route flush cache iptables -t nat -A POSTROUTING -m mark -mark 2 -o tun0 -j MASQUERADE iptables -t mangle -F iptables -t mangle -A PREROUTING -i br0 -p tcp --dport 80 -j MARK --set-mark 2 iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK --set-mark 2 ip rule add fwmark 2 table 100
Then I ran command on router, it's ok:
# traceroute 220.127.116.11 -Tnp 80 1 10.0.0.1 2ms 2ms 2ms .....
But ran this on a PC behind the router, the router reboots.
When ip route table 100 is not filled with tun0 related routes (means either empty or routes not via tun0),
the problem is gone. (but I can't get traffic dport 80 to tun0 for sure)
I think this problem is about PREROUTING@mangle along with tun0 policy route rule.
Note that the firmware I tested is weekly build (Because xt_mark is broken in stable build. I can't even use mark match/target).
The script runs ok on DD-WRT. And RT-N16 is not currently supported by OpenWRT.