💾 Archived View for perso.pw › blog › articles › 3.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2021-12-17)

-=-=-=-=-=-=-

How to add a route through a specific interface on FreeBSD 10

on Mastodon

If someday under FreeBSD you have a system with multiple IP address on

the same network and you need to use a specific IP for a route, you

have to use the -ifa parameter in the route command.

In our example, we have to use the address **192.168.1.140** to access

the network **192.168.30.0** through the router **192.168.1.1**, this

is as easy as the following.

route add -net 192.168.30.0 192.168.1.1 -ifa 192.168.1.140

You can add this specific route like any other route in your rc.conf

as usual, just add the -ifa X.X.X.X parameter.