Book Image

pfSense 2 Cookbook

Book Image

pfSense 2 Cookbook

Overview of this book

pfSense is an open source distribution of FreeBSD-based firewall that provides a platform for flexible 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. Through this book you will see that pfSense offers numerous alternatives to fit any environment's security needs. pfSense 2.0 Cookbook is the first and only book to explore all the features of pfSense, including those released in the latest 2.0 version. With the help of step-by-step instructions and detailed screenshots of the pfSense interface you will be able to configure every general and advanced feature from creating a firewall rule to configuring multi-WAN failover. Each recipe includes tips and offers advice on variations of the topic or references to other related recipes and additional information that can be found from other sources. pfSense 2.0 Cookbook covers the gamut of available features and functionality. The first three chapters will take you from a non-existent system to a basic pfSense firewall. The next chapter focuses on configuring any number of the VPN services available, a very important and sought-after feature for anyone implementing a firewall. The following two chapters describe how to configure the most advanced features available in pfSense; features that may only be relevant to the most experienced network admins. Chapter 7 is dedicated to understanding and configuring the "grab-bag" of features that are available in pfSense, but are often stand-alone options and unrelated to each other. The first appendix explains how to use the status monitoring tools available for many of the features. The second appendix wraps up with helping you to decide how and where pfSense may be incorporated into your system and what type of hardware is required based on your throughput needs.
Table of Contents (16 chapters)
pfSense 2 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Determining our interface requirements


This recipe will help us determine our interface requirements by analyzing our network design.

Getting ready

This recipe requires the analysis of our network diagram to understand how many interfaces our network will require. As an example, we’ll be using my own home network diagram, which is a good example of a typical small office environment.

How to do it...

  1. Let’s analyze our network diagram:

  2. We can see that our environment consists of four separate interfaces:

    • WAN (Wide Area Network): The Internet.

    • LAN (Local Area Network): Our primary internal network.

    • DMZ (Demilitarized Zone): Our internal network we allow external access to. Web servers, e-mail servers, and any other externally accessible devices belong to this interface.

    • WiFi (Wireless Guest Network): We’ve created this network for the convenience of our guests. They can connect with an easy-to-remember password (or perhaps no password at all) and surf the Web. We consider this interface insecure and treat it as such. We will define rules so that it has no access to our other interfaces.

    It’s apparent that our firewall requires four Network Interface Cards (NIC).

    Note

    Alternatively, the preceding diagram could be accomplished with two interfaces (WAN and LAN) and two VLANs (DMZ and WIFI).

How it works...

A firewall requires a separate NIC for every interface it hopes to support. This ensures a physical separation of network traffic. All inter-network traffic is forced to pass through the firewall where our rules will be applied and enforced. For that reason, a firewall requires a minimum of two NICs to function properly; one for internal traffic and one for external traffic. Each subsequent optional interface will require yet another NIC, which can be added at any time.

There’s more...

Typically, an NIC will have a single Ethernet port. However, some NICs may have two, four, or even more Ethernet ports on a single card. Our firewall in the preceding scenario could have four single-port NICs or a single four-port network interface card. Either way, it works.

Single-port NIC

Four-port NIC

pfSense 2.0: Minimum interface requirements

New to the latest version of PfSense is a single interface minimum to install the system. This means that all interfaces are now optional, except for the WAN. This allows for more flexibility while building or upgrading the system, but a proper firewall still requires a minimum of two.