Source-Based Routing with pf(4)

I’ve been playing around for a while now with FreeBSD’s setfib(1) command and multiple routing tables. Having multiple gateways and ensuring that the right traffic is routed to the right gateway is usually a huge PITA. The ‘standard’ way to deal with this problem seems to be using multiple routing tables (or more generally FIBs) and using setfib(1) to route the traffic. This works pretty great – until there’s a case where it doesn’t.


Use whatever you may find here at your own risk. This is my personal collection of things I feel may be useful to others but there are no guarantees, no warranties nor any form of support. See the FAQ for details.