Solved Different default route for base and jails with dynamic IP

Hi all,

My situation is this:
Code:
ISP ----> cheap router (192.168.1.1) -----> base FreeBSD and other boxes connected via wireless
Code:
ISP ----> cheap router (bridge router) -----> for FreeBSD jails (direct access to the internet)

So, I have two dynamic IPs. Routes are well defined for the base system (default to 192.168.1.1) and in pf rules for jails. But the problem is that I want my jails to have a default route to the second IP provided by my ISP that goes through my cheap router in bridge mode. As the IP is dynamic, how can I do it?
 
You don't need a custom kernel. Just update your /boot/loader.conf and reboot.

Example:
Code:
net.fibs=4

In your example, the "cheap router" is the same device but are you indicating that you are using two physical ports, one of which that is in the 192.168.1.x and one that is bridged?

If so, I'm inclined to say that you can leave the internal interface in the default FIB and set the other interface in a second FIB. I don't know if dhclient works well in multi FIB setups but if it does you can conceivable bind all your jails to the second FIB and do port forwarding from the interface on the second FIB to the jails on the second FIB. Not sure if that will work out but just some quick thoughts.
 
Back
Top