We do this by marking the traffic from the NAS (IP address 192.168.1.91) using port 51413
(Transmission) and we instruct netfilter to use table 11 for the marked traffic (table 11 is the table which
has a default route via the VPN) :
ip rule add fwmark 5 table 11
iptables -t mangle -I PREROUTING -s 192.168.1.91 -p tcp --dport 51413 -j MARK --set-mark 5
Joined: 18 Mar 2014 Posts: 12884 Location: Netherlands
Posted: Thu Oct 27, 2022 16:05 Post subject:
vatovey wrote:
@egc
Is this what you were referring to ?
--
We do this by marking the traffic from the NAS (IP address 192.168.1.91) using port 51413
(Transmission) and we instruct netfilter to use table 11 for the marked traffic (table 11 is the table which
has a default route via the VPN) :
ip rule add fwmark 5 table 11
iptables -t mangle -I PREROUTING -s 192.168.1.91 -p tcp --dport 51413 -j MARK --set-mark 5
That is certainly a way to do it but also have a look at:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=327810, this can be done via the GUI, challenge with this approach is the priority of rules, the last rules made have priority and usually the VPN client rules are made last so the firewall approach might be better in this case.