Policy-based routing setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following lines im a .network file:

[RoutingPolicyRule]
Priority = 10
IncomingInterface = lo
OutgoingInterface = bo_lan
DestinationPort = 22
IPProtocol = tcp
Family = both
InvertRule = yes
Table = 100

[Route]
Gateway = 192.168.0.1
GatewayOnLink = yes
Destination = 0.0.0.0/0
Scope = link
Protocol = static
Table = 100

[Route]
Gateway = fd46:1ffa:d8e0::1
GatewayOnLink = yes
Destination = ::/0
Scope = link
IPv6Preference = medium
Protocol = static
Table = 100


After the interface is started, the rule is indeed set up as expected:

[root@raspi-400 network]# ip rule
0:    from all lookup local
10:    not from all iif lo oif bo_lan ipproto tcp dport 22 lookup sshvpn proto static
32766:    from all lookup main
32767:    from all lookup default


The routes, however, are not:

[root@raspi-400 network]# ip route show table 100
[root@raspi-400 network]# ip -6 route show table 100
[root@raspi-400 network]#


The commands above do not return an error, unlike the case when a different table number is used:

[root@raspi-400 network]# ip route show table 101
Error: ipv4: FIB table does not exist.
Dump terminated
[root@raspi-400 network]#


This seems to indicate that the routing table has in fact been set up, but to an empty state. Am I doing something wrong here?





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux