pierredugland
Occasional Visitor
Hello,
I have followed the instructions here : https://github.com/RMerl/asuswrt-merlin.ng/wiki/Policy-based-Port-routing-(manual-method)
Here is my nat-start
I have verified that, when routing all traffic from 192.168.1.23 (using the UI), the vpn does work (i.e the traffic does get routed through the vpn client instance 2).
I have no other jffs scripts on the router. I have the latest (384_16) firmware version and restarted the router after modifying the script just in case.
What am I doing wrong ?
PS : this is p2p traffic so I'm checking the resulting IP by adding a magnet link in my deluge instance running into a docker container on my NAS. The NAS is 192.168.1.23 and the 8112 port on the nas gets forwarded to WAN port 8112 as well.
I have followed the instructions here : https://github.com/RMerl/asuswrt-merlin.ng/wiki/Policy-based-Port-routing-(manual-method)
Here is my nat-start
Code:
#!/bin/sh
sleep 10 # During the boot process nat-start may run multiple times so this is required
# Ensure duplicate rules are not created
for VPN_ID in 0 1 2 3 4 5
do
ip rule del prio 999$VPN_ID 2>/dev/null
done
# Create the RPDB rules
ip rule add from 0/0 fwmark "0x8000/0x8000" table main prio 9990 # WAN fwmark
ip rule add from 0/0 fwmark "0x7000/0x7000" table ovpnc4 prio 9991 # VPN 4 fwmark
ip rule add from 0/0 fwmark "0x3000/0x3000" table ovpnc5 prio 9992 # VPN 5 fwmark
ip rule add from 0/0 fwmark "0x1000/0x1000" table ovpnc1 prio 9993 # VPN 1 fwmark
ip rule add from 0/0 fwmark "0x2000/0x2000" table ovpnc2 prio 9994 # VPN 2 fwmark
ip rule add from 0/0 fwmark "0x4000/0x4000" table ovpnc3 prio 9995 # VPN 3 fwmark
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.23 -p tcp -m multiport --dport 8112,8113 -j MARK --set-mark 0x2000/0x2000
I have verified that, when routing all traffic from 192.168.1.23 (using the UI), the vpn does work (i.e the traffic does get routed through the vpn client instance 2).
I have no other jffs scripts on the router. I have the latest (384_16) firmware version and restarted the router after modifying the script just in case.
What am I doing wrong ?
PS : this is p2p traffic so I'm checking the resulting IP by adding a magnet link in my deluge instance running into a docker container on my NAS. The NAS is 192.168.1.23 and the 8112 port on the nas gets forwarded to WAN port 8112 as well.