pfSense 1.2 Firewall Appliance Guide

1.0 Introduction

The pfSense web site is at www.pfsense.com. This guide currently covers installing pfSense 1.2 on the hard disk of an i386 architecture 'PC' computer using the LiveCD which you download from www.pfsense.org/index.php?option=com_content&task=view&id=58&Itemid=46. pfSense is based on the FreeBSD operating system.

2.0 Installation And Minimum Configuration

The installer CD is a live CD that can be installed to hard disk, memory drive, etcetera.

Define network interfaces

Choose which interface is for LAN (local area network) and which is for WAN (wide area network). It will try to auto detect or you can just tell it which of the interfaces it shows are for LAN and WAN (which I find easier than the auto detection)

That's it! pfSense is now useable. However you probably want to install it to the hard disk and you may want to change some of these defaults from the console here then change some more (at least the password) from the web interface, or just change them all from the web interface.

Note: the default account has username 'admin' and password 'pfsense'.

Optional Configuration From Console

Note: the DNS server on the LAN interface is on by default.

I use the ipcalc tool on a Linux workstation to work out IP addressing schemes, alternatively there are many ipcalcs available as web sites:

$ ipcalc 10.0.0.1/255.255.255.0
Address:   10.0.0.1             00001010.00000000.00000000. 00000001
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   10.0.0.0/24          00001010.00000000.00000000. 00000000
HostMin:   10.0.0.1             00001010.00000000.00000000. 00000001
HostMax:   10.0.0.254           00001010.00000000.00000000. 11111110
Broadcast: 10.0.0.255           00001010.00000000.00000000. 11111111
Hosts/Net: 254                   Class A, Private Internet

Install To Hard Drive/Memory Drive (Optional)

pfSense should now be operational from the CD. If you want to install pfSense to a hard disk choose 99) Install pfSense to a hard drive/memory drive, etc. If you want you're able to configure pfSense further from the web interface before installing it to hard drive/memory drive.

Follow the prompts to install. Accepting the defaults for all questions should be fine. Note that hard disk geometry misalignments with the BIOS can cause difficulties which pfSense will tell you about. Choose either 'Uniprocessor kernel (one processor)' or 'Symmetric multiprocessing kernel (more than one processor)' depending on what the machine has.

Restore Configuration From Backup (Optional)

If you want you can restore a previously saved backup and all settings will be restored, including passwords and certificates. To do so you need to be attached to the firewall with a client computer, connect to its web interface using its default address of http://192.168.1.1 or what ever you set earlier if you changed this and go to Diagnostics → Backup/Restore.

After a restoration you need to install any packages you might have installed to the system you backed up from.

Optional Configuration From Web Interface

The rest of your interaction with pfSense can happen through the web browser on another computer.

Advanced Configuration

Configuration I'm Testing

Backup

Make a backup of the system to the computer you're connecting with: Diagnostics → Backup/Restore → Local → Backup configuration → Download configuration. Make fresh backups when you change any configuration.

3.0 Packages

From http://blog.pfsense.org/?p=179 13 March 2008: "FreeBSD removed 6.2 packages from all their mirrors, which broke a few of our packages. I fixed as many as I could with files we already had, or that I could still find, but some are still not working. We'll have to build these packages ourselves, and it'll be this weekend before anyone will have time to do so."

"Going forward we are only going to use package files from our servers so we don't get bitten by similar situations in the future."

pfSense packages are custom versions either maintained by the pfSense team or individuals. They don't ship with pfSense, they're downloaded over the internet when installed. They're made available as-and-when ready, not dependent on pfSense updates. There's no pfsense.com page announcing updates. The System → Packages → Installed packages page will tell you if newer versions are available. I think to upgrade you have to choose 'pkg' (reinstall this application); your configuration will be retained.

4.0 Other Configuration

Manual DNS Override

If you're having a problem such as the modem on the WAN interface is using a broken DNS server and you want to manually override it:

5.0 OpenVPN Server

pfSense's OpenVPN Server feature deals with allowing people to VPN in to the LAN. The OpenVPN Client feature deals with pfSense itself VPNing into another VPN Server and isn't covered here. You have to create your own CA, server and client certificates and keys, which I'll cover in a seperate document another time.

OpenVPN Server Configuration

VPN → OpenVPN → Server → +

Dynamic IP: yes

Address pool: 10.0.10.0/24 (or whichever you want. This is a subnet just for VPN clients, needs to not clash with any existing subnet)

Authentication method: PKI (Public Key Infrastructure)

Local network: 10.0.0.0/24 (or whichever matches your actual local addressing scheme) [this isn't available until you change 'Authentication method' from 'Shared key' to 'PKI (Public Key Infrastructure)']

CA certificate - paste in a .pem file, you need to create this elsewhere, I'll document this seperately

Server certificate - paste in a .pem file, you need to create this elsewhere, I'll document this seperately

Server key - paste in a .pem file without a passphrase included, you need to create this elsewhere, I'll document this seperately

DH parameters - Diffie Hellman parameters, you need to create this elsewhere, I'll document this seperately

DHCP-Opt.: WINS-Server: 10.0.0.10 (if you have a WINS server; change for your specific address)
(Note: I still don't have WINS working, something else must also be needed, at least with Linux clients)

LZO compression: yes

Save

Firewall Configuration

By default setting up OpenVPN doesn't actually open the firewall up to allow OpenVPN access. You have to do this yourself:
Firewall → Rules → + (add new rule) - Setup a rule to pass on WAN interface protocol UDP from any source to destination OpenVPN port:

Save → Apply changes

Further Reading

OpenVPN HOWTO

6.0 Wake On LAN

As long as you have the other prerequisites (computer BIOS of machines to be woken has WOL capability and it's turned on) this is how you can use Wake On LAN to wake machines when turned 'off' from pfSense.

Register machines for Wake On LAN by turning them all on. Go to Status → DHCP Leases. For each machine choose 'Add a Wake on Lan mapping for this address'.

You can wake a single machine using Services → Wake On LAN and choosing the MAC address in the list. You can wake all registered machines at once by choosing the appropriate button.

7.0 Captive Portal

Authenticated Captive Portal

This describes setting it up so that people require an account to connect to the the Internet.

The Captive Portal uses MAC address to track people unless you choose 'Disable MAC filtering'. The Captive portal bypass is either all or nothing, you can't enable certain ports to bypass. The Captive portal doesn't tell you total bandwidth consumed per user

"Platforms that have Wi-Fi and a TCP/IP stack but do not have a web browser that supports HTTPS cannot use many captive portals. Such platforms include the Nintendo DS running a game that uses Nintendo Wi-Fi Connection. Non browser authentication is possible using WISPr, an XML-based authentication protocol for this purpose, or MAC-based authentication or authentications based on other protocols."

Note: Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page.

Captive Portal Administrator's Guide

Issues For Captive Portal Users To Be Aware Of

8.0 Upgrading pfSense

Upgrades are available via www.pfsense.org/mirror.php?section=updates.

You can upgrade one of these two ways:

The system may (or maybe _will_, I'm not sure) restart to apply the upgrade.

7.0 Finding Help

Forum divided up in to the different pfSense features: forum.pfsense.org/index.php#2

Random knowledge about pfSense / answers to repeated questions: forum.pfsense.org/index.php/topic,7001.0.html