Firewall Public IPs instead of NAT

  • Hello,

    We were recently setup with a pfSense installation in a VMWare environment to provide firewall services for our other VMs. We're a web hosting company and would like to assign public IPs to our VMs but still have those public IPs firewalled by pfSense. By default, it seems as though our provider has setup the public IPs to bypass the firewall. What do we need to do to change this?

    Thanks in advance for your time and efforts..


  • It's a wild guess but I think the public IP's are probably bypassed because you have configured pfSense to have an IP within that same IP subnet. This way traffic never get's routed to pfSense because all IP's are within the same broadcast domain. In order to get your firewall to inspect the traffic you have to place the firewall between the ISP's uplink and your configured public IP's.

    You do this with either:

    • Routing: Obtain an extra (small) IP subnet from your ISP, configure that on your pfSense and let the ISP configure the default gateway in that same subnet. Configure the original IP range on the LAN interface of pfSense and make sure the default gateway of the VM's points to the pfSense LAN IP. Then ask your ISP to route the original subnet to the WAN IP configured on your pfSense.

    • Bridging: Only assign an IP from your current IP range on WAN interface, bridge it with your LAN interface and make sure all your VM's are attached via the LAN interface (not the WAN interface). The bridge will force the traffic to flow through the firewall so you're able to block/pass traffic.

    The first option is the most common one and pretty easy to understand, but it requires quite some changes in your environment and your ISP's. The second option requires less changes, but can be somewhat confusing at first with how things work and won't work together with CARP.

Log in to reply