Erik Kirschner

VMware Certified Professional, Cisco Certified
Security Professional, Cloud Computing
enthusiasm and Apple user...

  • O mne
  • CV
  • Služby
  • Shop
  • Kontakt



Hire me! I'm VMware and Cisco Certified Professional with deep knowledge base and face to face customer meetings at daily base.

pfSense firewall in High Availability mode (cluster)

Posted: November 15th, 2010 | Author: Erik | Filed under: Internet, Networking | Tags: alix, linux, load sharing, network security, Networking | 20 Comments »

Overview of a pfSense-CARP setup

You need one real IP address for every CARP cluster host. So, if you want to have 2 cluster members, you will need 2 IP addresses for the real interfaces and then an IP for each virtual IP address. So in this case it would amount to 3. In the example shown to the right, the primary CARP clusters WAN IP address is 127.29.29.1 and the backup firewalls WAN IP address is 127.29.29.2. The primary clusters LAN IP address is 192.168.1.2 and the backup firewall’s LAN IP address is 192.168.1.3.


Setting up dedicated pfsync interface

We strongly advise using a dedicated interface for pfsync.

Set up each cluster sync interface, give it an IP address in the same subnet. Example: on the master cluster member enter 192.168.4.1 and on the backup cluster member enter 192.168.4.2 for the IP address. Use a /24 subnet.

Enable pfSync

Enable pfSync in Firewall -> Virtual IPs -> CARP settings -> Synchronize Enabled (check it) on all cluster members.
-> Synchronize Virtual IPs [ X ]
-> Synchronize to IP [ insert Slave IP ONLY on Master! ]
-> Remote System Password [ do not forget! ]

Select the dedicated Sync interface with the Synchronize Interface dropdown on all cluster members.

Afterward visit Firewall -> Rules and add an allow all from any to any rule on each cluster member for the newly created pfsync interface.

Adding CARP shared virtual IP addresses

Now on the master cluster member add a virtual IP addresses of the CARP type in Firewall -> Virtual IPs. Make sure that the virtual IP addresses fall within the same subnet of an IP address defined on real interface (WAN, LAN, OPT1, etc.). You need to dedicate a unique VHID per shared virtual IP address. The lowest skew states that the host should be a master. The XMLRPC process will automatically add +100 to each host while syncing. So we recommend setting the skew to 0 on the master hosts CARP virtual IPs. pfSense will handle the rest.

Preparing for XMLRPC Sync

Now set the same Admin password and protocol for the webConfigurator (HTTP/HTTPS) on each cluster member

On the master cluster member, visit Firewall -> Virtual IPs -> CARP Settings and enter the 2nd cluster members sync ip address (earlier in example was 192.168.4.2). Afterwards, enable all sections you want to sync (Synchronize rules, Synchronize aliases, Synchronize nat, ..*). This will automatically push configurations from the master cluster member to the backups. Click save. You should see the virtual ip addresses automatically synchronized to the backup hosts

Setting up advanced outbound NAT

Enable advanced outbound NAT in Firewall -> NAT -> Outbound -> Enable advanced outbound NAT. Click save.

Edit the automatically added rule for LAN. Pick a shared CARP virtual IP address as the Translation IP address. Give the item a description and click Save.

Setting DHCP Server to use CARP LAN IP Address

On both firewalls, visit Services -> DHCP Server. Click on the LAN tab. Set the default gateway to 192.168.1.3. Click save.

It also may be a good idea to enable failover DHCP. Enter 192.168.1.2 in the failover peep box on the primary and 192.168.1.1 on the backup server. Click save.

Checking that XMLRPC sync worked

Visit the backup cluster member and verify that NAT, Virtual IP’s and rules have been synchronized correctly.

Finally on the backup host, visit Firewall -> Virtual IPs -> CARP settings -> and enable “Synchronize Enabled” and make sure that your pfSync interface is correct. Click save.

You should read the hardware redundancy chapter in the pfSense book before configuring CARP.

From the Tutorials page:

  • Building a fully redundant Cluster with 2 pfSense-systems between WAN/LAN with CARP & pfsync / pfSense CARP & pfsync failover-simulation

http://www.pfsense.org/mirror.php?section=tutorials/carp/carp-cluster-new.htm

I have many pfSense Firewall appliances in my shop, which you can buy.

That’s it! Enjoy your failover firewall solution.

Share and Enjoy:
  • Print this article!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • StumbleUpon
  • Twitter
  • Technorati
  • Diigo
  • E-mail this story to a friend!
  • FriendFeed
  • LinkedIn
  • Netvibes
  • RSS
  • Netvouz

20 Comments on “pfSense firewall in High Availability mode (cluster)”

  1. 1 RealTime - Questions: "How do i find my LAN ip address?" said at 20:02 on December 1st, 2010:

    [...] [...]

  2. 2 Erik said at 13:26 on December 2nd, 2010:

    via status and interfaces

  3. 3 business grants for women said at 00:38 on December 5th, 2010:

    Valuable info. Lucky me I found your site by accident, I bookmarked it.

  4. 4 pell grant said at 12:13 on December 9th, 2010:

    I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

  5. 5 pfSense High Performance Firewall | Erik Kirschner said at 09:25 on December 11th, 2010:

    [...] pfSense 2G High Performance Firewall, Router & Traffic Shaper Pri oboch produktoch je možné High Availability riešenie, kde su v prevádzke zapojené 2ks firewallov a v prípade výpadku jedného z firewallov [...]

  6. 6 nurse assistant said at 01:20 on December 12th, 2010:

    Great information! I’ve been looking for something like this for a while now. Thanks!

  7. 7 information technology said at 11:27 on December 20th, 2010:

    Keep posting stuff like this i really like it

  8. 8 Monex said at 14:11 on December 20th, 2010:

    So if you want to have 2 cluster members you will need 2 IP addresses for the real interfaces and then an IP for each virtual IP address. In the example shown to the right the primary CARP clusters WAN IP address is 127. Set up each cluster sync interface give it an IP address in the same subnet.

  9. 9 Erik said at 15:09 on December 20th, 2010:

    @Monex, no. You need 2 IP each for real interface and 1 virtual IP. This virtual IP is shared between cluster nodes. In this example:
    primary firewall real IP is 127.29.29.1/24
    backup firewall real IP is 127.29.29.2/24
    virtual IP (shared) is 127.29.29.3/24

  10. 10 medical billing said at 09:42 on December 24th, 2010:

    Thanks for an idea, you sparked at thought from a angle I hadn’t given thoguht to yet. Now lets see if I can do something with it.

  11. 11 Erik said at 11:55 on December 25th, 2010:

    @medical billing, it’s very useful solution, when you need stable service. :)

  12. 12 James L Despain said at 09:02 on December 27th, 2010:

    Thanks for the great post. Bookmarked

  13. 13 administrative assistant said at 06:54 on January 5th, 2011:

    Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.

  14. 14 federal student loan said at 22:23 on January 11th, 2011:

    Finally, an issue that I am passionate about. I have looked for information of this caliber for the last several hours. Your site is greatly appreciated.

  15. 15 medical billing said at 21:36 on January 20th, 2011:

    I think one of your advertisements caused my internet browser to resize, you might want to put that on your blacklist.

  16. 16 pfSense OpenVPN Authentification against Win 2008 R2 Active Directory via Radius Protocol | Erik Kirschner said at 11:06 on February 5th, 2011:

    [...] viete nasadiť aj do veľkých riešení, čoho dôkazom je aj možné high availability riešenie (pfSense firewall in High Availability mode, cluster). Vo väčších riešeniach sú samozrejme aj iné menežovatelné sieťové zariadenia (routers, [...]

  17. 17 Nannie Depass said at 19:27 on April 21st, 2011:

    Really love your post.

  18. 18 Anna said at 15:51 on December 19th, 2011:

    Our test sets will help you test and improve your knowledge and skills and pass the EPSO competition to receive thedreamt EU career. Don’t waver and try our unpaidsample today!

  19. 19 Ivo said at 12:44 on January 8th, 2012:

    Furnishing concepts for making your home interior. News and fashion trends from the world latest shows.

  20. 20 Georgi said at 20:42 on April 7th, 2012:

    Our company has a high proficiency in the manifacturing of high grade details, welded design and metal parts made of rust-proof steel and black steel with diverse thickness.


Leave a Reply

Najnovšie príspevky

  • CloudCamp Bratislava 2012 review
  • 20+ Data Backup & Synchronization Tools For Hard Drives
  • Cloud Camp Bratislava 2012
  • pfSense Firewall s podporou 3G, EDGE a GPRS
  • Mýty o Cloud Computingu
  • VMware Certified Professional on vSphere 5 Pass
  • Kúpil som si slobodu – Dynastar Legend Mythic

Kategórie

  • Cloud Computing
  • Creativity
  • Events
  • Game
  • GTD
  • Internet
  • Live
  • Mac
  • Movie
  • Networking
  • Running
  • Ski

What I'm Doing...

  • No tweets available at the moment.
  • More updates...

Powered by Twitter Tools

Tags

alix bike biking chocolate cisco cloud Creativity DIGIT DLNA dynastar event fail Google Google Wave GTD joost kablovka leaf life style linux load sharing Mac media server NAS Networking network security new york playstation PMXNet project management run sci-fi Ski solar energy success tablet trip Trixbox TV UPnP vmware VoIP wifi wine WordPress

Archív

Blogroll

  • alian.info
  • beh.sk
  • Miro Hlavaty Blog
  • PMXnet
  • Rackscale
  • Uniseka GS

© Copyright 2012 | Erik Kirschner | All Rights Reserved