I haven't tested this but like any sane OS it will optimise local traffic this way unless you trick it. One way might be to assign different subnets to each interface. Then add a route between them.
e.g.
ifconfig ix0 inet 192.168.1.2/24
ifconfig ix1 inet 192.168.2.2/24
route add 192.168.2.0/24 192.168.1.1
Enable forwarding. You might also add a firewall rule to stop it:
ipfw add 100 deny ip from 192.168.1.2 to 192.168.2.2 via lo0 or
(pf) block in on lo0 from 192.168.1.2 to 192.168.2.2
Another way might be to use a bridge.
Regards, Frank.
On Solaris this setup is quite easy, just enable symmetric routing: $ ipadm set-prop -p hostmodel=strong ipv4 $ ipadm set-prop -p hostmodel=strong ipv6 I was hoping for something similar on FreeBSD, but apart from net.inet.ip.rfc1122_strong_es which doesn't quite achieve the same effect, I could not find anything.
P.S. I followed this up as I was more than uncertain about this variable, and it seems seems no one knows what this actually does!
https://reviews.freebsd.org/D32912