ip rule add from 192.168.1.100 lookup 100

Category: Local Network & Public Hosting

ip rule add from 192.168.1.100 lookup 100

Route a source address through a custom table

This policy rule sends packets originating from 192.168.1.100 to routing table 100, whose routes you define separately with ip route add table 100. Source-based routing like this can split a machine across two ISPs or VPNs. The rule disappears on reboot unless saved in a config file such as /etc/iproute2/rt_tables.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.