So that clients do not notice the unavailability of a pfSense machine in the event of a problem with one of them, they will have to use the virtual IP addresses that will be shared by your pfSense machines.
It is therefore necessary to create a CARP virtual IP (VIP) address for each logical interface (WAN, LAN, etc.) of pfSense to which a client PC can access.
On the 1st pfSense machine (which is therefore the one acting as master), go to: Firewall -> Virtual IPs.
Important : the configuration must only be carried out on the 1st pfSense machine (master), because this configuration will be automatically replicated to the 2nd pfSense machine (slave).
On the "Firewall / Virtual IPs" page that appears, click on: Add.
In the "Edit Virtual IP" section, configure the virtual WAN IP address settings like this:
Then, click Save.
Source : Virtual IP Addresses | pfSense Documentation.
Click: Apply Changes.
Plain Text
The VIP configuration has been changed. The changes must be applied for them to take effect.
The CARP virtual IP (VIP) address for the WAN interface has been created.
Do the same for the LAN interface of your 2 pfSense machines.
To do this, click again on: Add.
This time, configure the settings like this:
Then, click Save.
The CARP virtual IP (VIP) address for the LAN interface has been created.
On your 2nd pfSense machine, go to "Firewall -> Virtual IPs" and you will see that the CARP virtual IP (VIP) addresses you just configured on the 1st pfSense machine are already there.
Indeed, the synchronization automatically replicated this configuration from the 1st pfSense machine to the 2nd pfSense machine.
Important : synchronization is only done in 1 direction. From the master machine to the slave machine.
For outgoing network traffic (coming from PCs on the LAN to the Internet via the WAN interface) to use the CARP virtual IP (VIP) address defined for the WAN interface, you must configure network address translation (NAT) by going to: Firewall -> NAT.
Go to the "Outbound" tab, select "Hybrid Outbound NAT rule generation..." and click Save.
Click: Apply Changes.
Plain Text
The NAT configuration has been changed. The changes must be applied for them to take effect.
The outgoing NAT mode has been changed.
Now that hybrid outbound NAT mode is enabled, you can add mappings manually that will be used in addition to the outbound NAT rules automatically generated by pfSense.
To do this, in the "Mappings" section, click on: Add.
In the "Edit Advanced Outbound NAT Entry" section, configure these settings:
In the "Translation" section, select the previously created CARP virtual (VIP) address for the WAN interface.
If you used the same name as in this tutorial, this address is named "WAN CARP VIP".
In the "Misc" section, provide "LAN to WAN" as the description.
Then, click Save.
Click: Apply Changes.
The changes have been applied.
In the "Mappings" section, you will see that the "LAN to WAN" mapping has been created.
Note: if you have other local networks accessing the Internet via pfSense, add new mappings here specifying the interface and subnet used.
If client PCs on the LAN are likely to connect to external VPN servers using IPsec that do not support NAT-T, you will need to add a NAT mapping under pfSense.
Otherwise, you can skip this step of the tutorial.
To add this mapping, click again: Add.
Configure this mapping like this:
In the "Translation" section:
Then, click Save.
Source : Outbound NAT | pfSense Documentation.
Click: Apply Changes.
The changes have been saved.
Your mapping for IPsec has been created.
Firewall 7/25/2025
Firewall 7/2/2025
Firewall 6/18/2025
Firewall 8/20/2025
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
No comment