Book Image

pfSense 2.x Cookbook - Second Edition

By : David Zientara
Book Image

pfSense 2.x Cookbook - Second Edition

By: David Zientara

Overview of this book

pfSense is an open source distribution of the FreeBSD-based firewall that provides a platform for ?exible and powerful routing and firewalling. The versatility of pfSense presents us with a wide array of configuration options, which makes determining requirements a little more difficult and a lot more important compared to other offerings. pfSense 2.x Cookbook – Second Edition starts by providing you with an understanding of how to complete the basic steps needed to render a pfSense firewall operational. It starts by showing you how to set up different forms of NAT entries and firewall rules and use aliases and scheduling in firewall rules. Moving on, you will learn how to implement a captive portal set up in different ways (no authentication, user manager authentication, and RADIUS authentication), as well as NTP and SNMP configuration. You will then learn how to set up a VPN tunnel with pfSense. The book then focuses on setting up traffic shaping with pfSense, using either the built-in traffic shaping wizard, custom ?oating rules, or Snort. Toward the end, you will set up multiple WAN interfaces, load balancing and failover groups, and a CARP failover group. You will also learn how to bridge interfaces, add static routing entries, and use dynamic routing protocols via third-party packages.
Table of Contents (18 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

Choosing a form factor


This section describes how to choose the best hardware configuration based on our firewall requirements.

It's easiest to choose a form factor if we've already decided on the rest of our prerequisites:

  • Deployment scenario
  • Throughput requirements
  • Interface requirements
  • Image platform

Before choosing a form factor, we first need to evaluate the different types of form factors:

  • Small form: Energy-efficient, quiet (often silent), small footprint form factor.
  • Desktop: Standard desktop hardware. Easily upgradable and most people will have an older machine lying around that's perfectly suited for running pfSense.
  • Server: Larger or more complex environment may require server-class hardware.

 

 

Consider whether any of our requirements require special hardware. In our case, we need moderate throughput and aren't using any packages that require special hardware. Low power consumption and silent operation are important to our small office/home office, so we're opting for small form factor.

The choice of a form factor has more to do with our environment than our pfSense installation. Every environment will vary and form factors will differ. Thanks to the vast variety of computer hardware on the market, any deployment of pfSense is possible on any type of form factor, with the exception of Netgate ADI. While most standard platforms are installed on desktops, and most embedded platforms on appliances, there's no reason they can't be swapped if we've equipped our hardware properly.

There's no reason we can't use a laptop. If we have an old laptop lying around, it would probably make a great, albeit unusual, pfSense machine. The biggest obstacle we'd likely face is adding NICs. Typical laptop NICs that fit into laptop expansion slots  (such as ExpressCard) might not be compatible with pfSense, and USB Ethernet adapters are often unreliable. One possibility is an all-VLAN setup with both WAN and LAN and any other network on the same interface as a VLAN, but this would mean having WAN and LAN traffic on the same physical interface, which clearly is a security concern.  

Note

As with all open source projects, it's best to refer to the project's hardware compatibility list before adding new hardware.

 

 

Installing the embedded platform on a desktop/server/laptop

Some people really enjoy the convenience of running a system from a compact flash card. Testing a new version of pfSense, or reverting back to a backup, is as easy as swapping CF cards. Most desktops don't come with a CF card reader installed, but there are plenty of adapters to choose from.

Installing the standard platform on an appliance

Of all the different installation scenarios, installing the standard version on an appliance equipped with a hard drive can be the most challenging. Appliances are meant to be small, so if they've already fitted a hard drive in there, you can be fairly certain there won't be an optical drive. Secondly, most appliances don't have built-in video-out, which means other means of connection (usually serial or USB) is required. We'll have to refer to our manufacturer's documentation if we find ourselves in this situation.

Note

Read more about pfSense Appliances and Security Gateways here: https://www.pfsense.org/products/.