The default Selective Routing/Dual-WAN interfaces
ovpnc1,ovpnc2 etc. are defined in
/etc/iproute2/rt_tables
and the entries are used by '
/usr/sbin/vpnrouting.sh' to create the necessary Selective Routing environment (apart from
fwmark based Selective Routing for ports,MACs,IPSETs etc.)
I prefer to customise the entries so I have renamed
'ovpnc1' to
'NewYork' and
'ovpnc5' to
'UK' etc. to make it
visually more human friendly when tinkering with the configs, and to reduce the possibility of typo errors when I start to tinker with Selective Routing.
i.e. it is far less likely I would confuse
NewYorK with
UK whereas
ovpnc1/ovpnc2 etc. could easily be incorrectly used by mistake because of a stupid 1 char typo etc.
Code:
ip rule
0: from all lookup local
10000: from all fwmark 0x7000/0x7000 lookup main
10100: from all fwmark 0x1000/0x1000 lookup NewYork
10101: from 172.16.1.1 lookup NewYork
10901: from 172.16.5.5 lookup UK
20100: from 10.88.101.0/24 lookup NewYork
32766: from all lookup main
32767: from all lookup default
ip route show table NewYork
10.16.0.0/24 dev tun22 scope link
10.88.101.0/24 dev br1 scope link
10.8.0.0/24 dev tun21 scope link
10.88.8.0/24 dev br0 proto kernel scope link src 10.88.8.1
100.120.242.0/23 dev tun11 proto kernel scope link src 100.120.243.15
default via 100.120.242.1 dev tun11
rather than
Code:
ip rule
0: from all lookup local
10000: from all fwmark 0x7000/0x7000 lookup main
10100: from all fwmark 0x1000/0x1000 lookup ovpnc1
10101: from 172.16.1.1 lookup ovpnc1
10901: from 172.16.5.5 lookup ovpnc5
20100: from 10.88.101.0/24 lookup ovpnc1
32766: from all lookup main
32767: from all lookup default
ip route show table ovpnc1
10.16.0.0/24 dev tun22 scope link
10.88.101.0/24 dev br1 scope link
10.8.0.0/24 dev tun21 scope link
10.88.8.0/24 dev br0 proto kernel scope link src 10.88.8.1
100.120.242.0/23 dev tun11 proto kernel scope link src 100.120.243.15
default via 100.120.242.1 dev tun11
However, unless you have a very advanced need, then I would recommend you stick with the default
ovpncX tables i.e. why (re)write scripts if all the work has
already been done for you?
- especially if you want quicker support from the forum.