Src IP 0.0.0.0 for outgoing off-net ping & SSH packets

Eugene Grosbein eugen at grosbein.net
Fri Apr 23 08:59:03 UTC 2021


21.04.2021 23:35, gfoster411 at charter.net wrote:

> Do you have any tips or specific areas of the routing code I should be
> looking into ?

ping using 0.0.0.0 as source address means you have an inteface without any IP address assigned, indeed.
And this is the interface selected as outgoing for requests.

If you have such interfaces and observe 0.0.0.0 as source, you should stop relying
on automatic source IP selection and supply some IP manually, instead:

ping -S $myip $destination

Same with ssh -b etc.

I have similar setups with vlan interfaces without IP that generally used to route /32 prefixes into,
so I have to use ping -S in such cases, it helps.



More information about the freebsd-net mailing list