Skip to main content
Version: current

rule


routing/rule

Type: Directory

FlagNameDescription
Xdisableddisabled
Iinactiveinactive
*defaultdefault
ArgumentTypeDescription
src-address ( unset )address (flags=64iv/)Source address to match.
dst-address ( unset )address (flags=64iv/)Destination address to match.
routing-mark ( unset )enumMatch a specific routing mark.
interface ( unset )interface_enumIncoming interface to match.
actionenum (lookup | lookup-only-in-table | unreachable | drop | mangle)

Action to take on the matching packet:

  • drop - silently drop the packet.
  • lookup - perform a lookup in routing tables.
  • lookup-only-in-table - perform lookup only in the specified routing table (see the table parameter).
  • unreachable - generate an ICMP unreachable message and send it to the source.
tableenum (local)Name of the routing table to use for lookup.
min-prefix ( unset )numHide routes from the routing table with the specified prefix length from packets processed by this routing rule.
This is equivalent to the Linux IP rule suppress_prefixlength. For example, set the value to 0 to suppress the default route in the routing decision.
vrfswitch
realm ( unset )num { }
chain ( unset )enumName of the chain used by routing decision rules. By default, user is used when the chain is not specified. If the chain name matches a built-in routing decision name, user-created rules are added after that decision. For example, if chain=mangle, user-created rules in this chain are located immediately after the mangle decision.