Is it possible redirect outbound traffic from one NIC to another without natd?

Hi

I set[]up multiple routing tables with setfib for two NICs.
Code:
$nic1: 10.0.0.2/24, defaultrouter=10.0.0.1, fib=0
$nic2: 10.0.1.2/24, setfib 1 route add default 10.0.1.1
ipfw add 1000 setfib 1 ip from any to any via $nic2
ipfw add 2000 setfib 0 ip from any to any via $nic1
If I access services such as the web through NIC2, the reply traffic will go through NIC1 with default route 10.0.0.1, that's incorrect. So I set[]up natd with ipfw divert.
Code:
natd -same_ports -n $nic2
ipfw add 500 divert natd ip from 10.0.1.2 to any via $nic1
Now it's working fine. But is there another way to redirect outbound traffic from one NIC to another by using PF or ipfw in-kernel NAT? I don't think natd can handle high traffic.
 
Well, I use fwd instead of divert:
Code:
ipfw add fwd 10.0.1.1 ip from 10.0.1.2 to any via $nic1
 
Back
Top