On Fri, Nov 30, 2018 at 09:51:37PM +0100, Janne Johansson wrote: > Den fre 30 nov. 2018 kl 21:32 skrev Chris Bennett > <cpb_m...@bennettconstruction.us>: > > I'm just curious. Is there a default method to select on this? Random? > > Can I control this somehow? > > It's clear how everything else selects IP, but I just wanted to know in > > case that ever mattered, say one of my IPs were blocked. > > And I wanted to be sure which IP outbound is or is not used for running > > something like lynx, etc. > > > > Not terribly important, but at least interesting question for me. > > Normally, the IP on the interface which the route table says lead to the > destination get chosen, unless the program deliberately chooses (or > allows to choose) one of the other IPs you have.
When using the route you can specify which interface address to use (look for -ifa in route(8)) else the kernel will use the IP address which gets you to the gateway of that route. -- :wq Claudio