Пытаюсь маршрутизировать трафик с локального интерфейса (eth0/172.17.169.40) через дополнительную таблицу:
$ cat /etc/iproute2/rt_tables
400 custom
$ ip rule list
0: from all lookup local
32763: from 192.168.0.0/16 lookup custom
32764: from 172.16.0.0/12 lookup custom
32765: from 10.0.0.0/8 lookup custom
32766: from all lookup main
32767: from all lookup default
$ ip route show table custom
default via 172.17.169.254 dev eth0
$ ip route show table main
default via 172.17.169.254 dev eth0 proto static metric 100
172.17.169.0/24 dev eth0 proto kernel scope link src 172.17.169.40 metric 100
192.168.17.194 via 172.17.169.200 dev eth0
$ ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 172.17.169.0 dev eth0 proto kernel scope link src 172.17.169.40
local 172.17.169.40 dev eth0 proto kernel scope host src 172.17.169.40
broadcast 172.17.169.255 dev eth0 proto kernel scope link src 172.17.169.40
Теперь с консоли сервера пытаюсь получить доступ к 192.168.17.194, но трафик идет через 172.17.169.200
$ ip route get 192.168.17.194
192.168.17.194 via 172.17.169.200 dev eth0 src 172.17.169.40
cache
Но
$ ip route get 192.168.17.194 from 172.17.169.40
192.168.17.194 from 172.17.169.40 via 172.17.169.254 dev eth0
cache
Для уверенности добавляю еще правила:
$ ip rule list
0: from all lookup local
32760: from all to 171.17.169.40 lookup custom
32761: from all oif eth0 lookup custom
32762: from 172.17.169.40 lookup custom
32763: from 192.168.0.0/16 lookup custom
32764: from 172.16.0.0/12 lookup custom
32765: from 10.0.0.0/8 lookup custom
32766: from all lookup main
32767: from all lookup default
Результат тот же.
В чем ошибка?