FreeBSD 5.3 firewall with 3 interfaces running ipfilter and ipnat:
fxp0 - Interface with a static public internet IP address (123.456.789.1/24)
fxp1 - interface with static private address for LAN (10.10.10.1/24)
fxp2 - unused (planned 987.654.321.1/24)
I use ipnat to rewrite requests coming in on fxp0 from the internet to servers on the lan on fxp1. It works great.
Now I have a new lan in the building that also has an internet connection. I want traffic destined for the internet address of the firewall to go over the lan instead of the internet. Its a long story but I have to do this at the firewall and not at the router. Similarly all traffic from the original LAN on fxp1 should be delivered locally instead of through the building. To do this I'll plug the switch for the 2nd LAN into fxp2.
I've tried using map statements in ipnat.rules but that doesn't seem to work quite right. If I just use the bridge functionality of freebsd on fxp0 and fxp2 would that effectively allow me to send traffic from a device on the new lan to an address on fxp0 over fxp2? How would traffic from lan 2 being sent to fxp0's address not be forced through lan 2's gateway since they're on different networks?
Would the bridging functionality take place before the traffic goes through ipnat and ipfilter so all of my existing rules for each would work? Keep in mind lan 1 and lan 2 have different ISP's.
fxp0 - Interface with a static public internet IP address (123.456.789.1/24)
fxp1 - interface with static private address for LAN (10.10.10.1/24)
fxp2 - unused (planned 987.654.321.1/24)
I use ipnat to rewrite requests coming in on fxp0 from the internet to servers on the lan on fxp1. It works great.
Now I have a new lan in the building that also has an internet connection. I want traffic destined for the internet address of the firewall to go over the lan instead of the internet. Its a long story but I have to do this at the firewall and not at the router. Similarly all traffic from the original LAN on fxp1 should be delivered locally instead of through the building. To do this I'll plug the switch for the 2nd LAN into fxp2.
I've tried using map statements in ipnat.rules but that doesn't seem to work quite right. If I just use the bridge functionality of freebsd on fxp0 and fxp2 would that effectively allow me to send traffic from a device on the new lan to an address on fxp0 over fxp2? How would traffic from lan 2 being sent to fxp0's address not be forced through lan 2's gateway since they're on different networks?
Would the bridging functionality take place before the traffic goes through ipnat and ipfilter so all of my existing rules for each would work? Keep in mind lan 1 and lan 2 have different ISP's.