We may also add iface address access in future but it isn't as easy as it seems. The iface may have more than one address and we still don't have a method to iterate over a list in filters. Anyway, the "foreach" construction is on our todo list... Stay tuned! M.
Quidquid latine dictum sit, altum videtur. -----Original Message----- From: Saku Ytti <[email protected]> To: [email protected] Sent: Tue, 20 Mar 2018 7:58 PM Subject: Re: static routes and 'src' parameter Pilot error, this works: filter kernel_out { if net = 0.0.0.0/0 then { #krt_prefsrc from lo; krt_prefsrc = 129.250.15.29; accept; } reject; } I wish 'krt_prefsrc from lo' would work, as it would require less tooling to generate config :>. But no biggy. Thanks people! On 20 March 2018 at 20:22, Saku Ytti <[email protected]> wrote: > I want default address to use lo as source for locally originated > connections. Is this possible? > > bird> show route > 0.0.0.0/0 via 204.141.224.2 on ens224 [static1 18:11:50] * (200) > 129.250.15.29/32 dev lo [direct1 18:11:50] * (240) > 129.250.0.0/16 via 204.141.224.2 on ens224 [red 18:17:38] * (100) > [AS2914i] > via 204.141.224.0 on ens192 [blue 18:11:56] (100) [AS2914i] > bird> > > protocol static { > route 0.0.0.0/0 recursive 129.250.0.0; > } > > terraform00:~# ip route > default via 204.141.224.2 dev ens224 proto bird metric 64 > default via 204.141.224.0 dev ens192 src 129.250.15.29 metric 200 > default via 204.141.224.2 dev ens224 src 129.250.15.29 metric 205 > 10.20.40.0/24 dev ens256 proto kernel scope link src 10.20.40.1 > 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown > 204.141.224.0/31 dev ens192 proto kernel scope link src 204.141.224.1 > 204.141.224.2/31 dev ens224 proto kernel scope link src 204.141.224.3 > terraform00:~# > > > -- > ++ytti -- ++ytti
