change pref src for route

Hello!

I have VM with FreeBSD 12.2. vtnet0 has grey ip address from 10.0.0.0/8 and lo0 has white ip address from 92.xxx.yyy.0/24. I want to set default gw via vtnet0 with pref src address of lo0. How I can do it?
 
Grey, white? What is that supposed to mean?


That's not how TCP/IP works.
Grey addresses from RFC1918. White addesses are routed to Internet.

But in Linux I can set default route with pref src setting: ip r add default via gw src <loopback ip address> and it works correctly.
 
Hello!

I have VM with FreeBSD 12.2. vtnet0 has grey ip address from 10.0.0.0/8 and lo0 has white ip address from 92.xxx.yyy.0/24. I want to set default gw via vtnet0 with pref src address of lo0. How I can do it?
With NAT. I am doing some similar things with NAT and with ipfw fwd.
 
Back
Top