An [RoutingPolicyRule] section accepts the following keys.
Specify several [RoutingPolicyRule] sections to configure several
rules.
TypeOfService=
Takes a number between 0 and 255 that specifies the type of
service to match.
From=
Specifies the source address prefix to match. Possibly
followed by a slash and the prefix length.
To=
Specifies the destination address prefix to match. Possibly
followed by a slash and the prefix length.
FirewallMark=
Specifies the iptables firewall mark value to match (a number
between 1 and 4294967295). Optionally, the firewall mask
(also a number between 1 and 4294967295) can be suffixed with
a slash ("/"), e.g., "7/255".
Table=
Specifies the routing table identifier to lookup if the rule
selector matches. Takes one of predefined names "default",
"main", and "local", and names defined in RouteTable= in
networkd.conf(5), or a number between 1 and 4294967295.
Defaults to "main".
Priority=
Specifies the priority of this rule. Priority= is an
unsigned integer in the range 0...4294967295. Higher number
means lower priority, and rules get processed in order of
increasing number. Defaults to unset, and the kernel will
pick a value dynamically.
IncomingInterface=
Specifies incoming device to match. If the interface is
loopback, the rule only matches packets originating from this
host.
OutgoingInterface=
Specifies the outgoing device to match. The outgoing
interface is only available for packets originating from
local sockets that are bound to a device.
SourcePort=
Specifies the source IP port or IP port range match in
forwarding information base (FIB) rules. A port range is
specified by the lower and upper port separated by a dash.
Defaults to unset.
DestinationPort=
Specifies the destination IP port or IP port range match in
forwarding information base (FIB) rules. A port range is
specified by the lower and upper port separated by a dash.
Defaults to unset.
IPProtocol=
Specifies the IP protocol to match in forwarding information
base (FIB) rules. Takes IP protocol name such as "tcp", "udp"
or "sctp", or IP protocol number such as "6" for "tcp" or
"17" for "udp". Defaults to unset.
InvertRule=
A boolean. Specifies whether the rule is to be inverted.
Defaults to false.
Family=
Takes a special value "ipv4", "ipv6", or "both". By default,
the address family is determined by the address specified in
To= or From=. If neither To= nor From= are specified, then
defaults to "ipv4".
User=
Takes a username, a user ID, or a range of user IDs separated
by a dash. Defaults to unset.
SuppressPrefixLength=
Takes a number N in the range 0...128 and rejects routing
decisions that have a prefix length of N or less. Defaults to
unset.
Type=
Specifies Routing Policy Database (RPDB) rule type. Takes one
of "blackhole", "unreachable" or "prohibit".