By default using this version of the selective routing script nothing goes via the VPN unless explicitly defined.
So if you were to remove ALL three of the tagging rules this this should be the case...if it isn't then you will need to look at the log to see if there are any errors.
However
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 10.10.1.100 -j MARK 0
shouldn't this be in the same format as the two rules below?
i.e.
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 10.10.1.100 -j MARK --set-mark 0
although it should be tagged to the WAN by default anyway.
I suggest you dump the tables/rules using
ip rule
iptables -t mangle -L -nv --line
ip route show table 101
Ok so i'm doing something totally wrong because all my traffic is going out to the VPN.
EDIT: ok made that correction you pointed out. updating the info below with the new stuff.
here are the ip rules, tables and routes...
Code:
dubwize@RouteBox:/jffs/scripts# ip rule
0: from all lookup local
32765: from all fwmark 0x1 lookup 101
32766: from all lookup main
32767: from all lookup default
dubwize@RouteBox:/jffs/scripts# iptables -t mangle -L -nv --line
Chain PREROUTING (policy ACCEPT 3662 packets, 2253K bytes)
num pkts bytes target prot opt in out source destination
1 308 43136 MARK all -- br0 * 0.0.0.0/0 0.0.0.0/0 source IP range 10.10.1.100-10.10.1.100 MARK and 0x0
2 2 690 MARK all -- br0 * 0.0.0.0/0 0.0.0.0/0 source IP range 10.10.1.2-10.10.1.99 MARK set 0x1
3 738 66478 MARK all -- br0 * 0.0.0.0/0 0.0.0.0/0 source IP range 10.10.1.101-10.10.1.254 MARK set 0x1
Chain INPUT (policy ACCEPT 1545 packets, 1136K bytes)
num pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 2047 packets, 1107K bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1138 packets, 231K bytes)
num pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 3188 packets, 1338K bytes)
num pkts bytes target prot opt in out source destination
dubwize@RouteBox:/jffs/scripts# ip route show table 101
default via 10.149.1.6 dev tun11
these are the only errors in my log that i can find, and these are normal afaik.
Code:
Mar 4 19:42:00 openvpn[2821]: Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
Mar 4 19:42:00 openvpn[2821]: Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Mar 4 19:42:00 openvpn[2821]: Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Mar 4 19:42:00 openvpn[2821]: Options error: option 'route' cannot be used in this context ([PUSH-OPTIONS])
Last edited: