Firewall – use the pfSense WAN IP as public IP for 1:1 NAT? What about port forwarding

firewallnat;pfsenseport-forwarding

I have a dual pfSense configuration with CARP. Both WAN interfaces are assigned consecutive WAN IP .150, .151. I think it is silly that pfSense would require them both to have these dedicated IP so I was wondering if it is possible that I could use 1:1 NAT and add their IP as Virtual (CARP) IP in the system. So:

pf0 - WAN IP .150
pf1 - WAN IP .151
CARP IP0 - .150
CARP IP1 - .151
1:1 NAT Entry .150 <-> 10.1.1.150
1:1 NAT Entry .151 <-> 10.1.1.151

If this is not possible, can I at least forward certain requests to certain ports (HTTP/S) @ .150, .151 to appropriate servers?

Port forward .150:80,443 <-> 10.1.1.150:80,443
Port forward .151:80,443 <-> 10.1.1.151:80,443

Best Answer

Generally speaking, No.

The IP "foot" for carp monitoring/communication is only present on ONE machine (the box it's assigned to). By definition it is not a redundant IP, and it shouldn't really be used for serving other traffic.

Take the following scenario as an example:

  • You configure port 80 on .150 (primary FW) and .151 (backup FW) to forward somewhere.
  • The primary FW fails.
    • Now all traffic going to .150 is hitting a dead IP (your service on .150 is down).
  • The primary FW comes back and the secondary FW fails.
    • Now the traffic going to .150 works again, but all the traffic to .151 is hitting a dead IP.
Related Topic