Comment 2 for bug 2056799

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Well, I think I did have the same usecase, kindof.

So I did:

1. Create a new routing table:
echo "20 ext" >> /etc/iproute2/rt_tables

2. Added default route in the table, where 198.51.100.1 is basically a leaf
ip r add default via 198.51.100.1 dev eth1 scope link table ext

3. Created IP rule to forward public networks to this table, where 203.0.113.0/24 is a public network:
ip rule add from 203.0.113.0/24 table ext