pfSense: Presented by Neal Dudley

We got started about 20 minutes late due to some hardware problems. Neal had brought his Apple laptop, which uses the (non)standard Apple video connection, and he hadn't remembered to bring his adapter. Also Neal had not realized that the Solaris machines were not standard architecture, and therefore would not be able to boot pfSense, or any other distribution.

What could have been a disaster was quickly saved by hardware donations from the audience. Eric donated the use of his laptop to boot the pfSense live CD, Andrew donated his laptop's network card, and Matt donated his laptop to act as client computer running the web interface. What better place to get people to quickly throw a bunch of hardware together to build a firewalled network than a Linux meeting? Plus, it showed the excellent hardware support of pfSense, being able to run on a hodge podge system.

Physical Setup

The actual setup used was one laptop running pfSense, and one client laptop running Fedora. The pfSense laptop had two network cards, one connected to the Internet and the other connected to the local network. We used a cross-over cable to directly hook the pfSense laptop up to the client laptop.

Overview

pfSense is an inexpensive solution for setting up a firewall, and monitoring bandwidth usage. PfSense started as a fork of m0n0wall, but focuses more on PC installations than on embedded hardware. Additionally, pfSense has a lot of additional features over m0n0wall including vlans, traffic shaping etc. PfSense also has good ppoe support that actually works as advertised. One of the cool things that pfSense can do is set up CARP (Common Address Redundancy Protocol) with two pfSense boxes. In this situation, if one pfSense box goes down for any reason, the remaining box will take up all the extra traffic (transparent to the user). PfSense is based on FreeBSD, and has really good hardware support. Without any help, it recognized all 3 NICs on Eric's laptop (2 wired and 1 wireless).

The hardware requirements for pfSense are really quite modest, 100 Mhz cpu, and 128 megs of ram.

Boot-Up and CLI Interface

During the boot-up sequence of pfSense, we briefly discussed vlans and “router on a stick.” PfSense gave a number of prompts on boot-up to choose things like the NIC facing the local network, and the NIC facing the Internet. All in all, the boot-up options were rather straight forward and easy to figure out.

The login counsel of pfSense displays a simple menu, offering a number of options (see below).

  pfSense console setup
***********************
  0)  Logout (SSH only)
  1)  Assign Interfaces
  2)  Set LAN IP address
  3)  Reset webConfigurator password
  4)  Reset to factory defaults
  5)  Reboot system
  6)  Halt system
  7)  Ping host
  8)  Shell
  9)  PFtop
 10)  Filter Logs
 11)  Restart webConfigurator
 12)  pfSense PHP shell
 13)  Upgrade from console
 99)  Install pfSense to a hard drive/memory drive, etc.

As as example of the command line interface, Neal showed PFtop, which gave an overview of the traffic going through the firewall. We went through the other options one by one and Neal explained each one.

PfSense provides command line access from either the local box, or via ssh from the lan, or ssh via the wan (disabled by default). However, Neal pointed out that the majority of the configuration happens via the web interface.

Web Interface

After our brief foray into the command line side of pfSense, we switched the projector over to Matt's laptop to view the web gui. We logged in via the web interface and started going through the initial configuration.

It was pointed out that Eric's laptop had a lot more power than what would typically be found on a firewall box. Therefore loading the initial configuration of pfSense on slower hardware could take a long time. So depending on your hardware, expect to wait a while.

The first things you have to set up are a hostname, domain, dns server, and a time server. depending on the ISP, you may need to spoof the mac address (easy in the web gui).

The next steps were the configure the subnet, and set up a username and password for the gui account. It was noted that the admin and web-admin accounts are completely separate. This allows for granular levels of accounts. Certain users can be set up to use certain parts of pfSense, without allowing complete access.

Once the basic setup was out of the way, we arrived at the system overview page. This page shows some basic hardware stats, including cpu, memory, and disk usage. Eric's laptop was overpowered, so we were using almost nothing.

We then entered the web configuration settings, and talked about the following:

Next we went back to look at a few of the configuration options in more detail. We started with firewall rules, and defined a new rule to block ICMP echos, so that pfSense wouldn't respond to a ping.

Neal asked for people to ping the server, and we went to watch the command line logging (PFtop) as a large number of ping requests from a variety of IP's were logged.

Then we went back to the web-gui and looked through the system logs. It has a nice log format that makes it easy to see what is going all.

We then set up external ssh access.

Note 5 Minute Break

Neal noted that this was like a national lampoon's pfSense presentation: Hardware problems, bathroom break, and internal sabotage (ssh access). Ssh access was quickly disabled.

We then looked at the web gui's traffic graphs (svg's, so they won't work in Internet Explorer). The traffic graphs are updated in real time, and can quickly show what is going on on the network. There are picture of the traffic graphs on the talug website.

Installation and Hardware

Documentation

PfSense documentation: it doesn't suck as much as you would think! They have video tutorials to show how to set things up, it is actually pretty cool.