Install PacketFence Network Access Control on Ubuntu

Install PacketFence Network Access Control on Ubuntu

PacketFence is a network access control (NAC) system featuring a captive-portal for registration and remediation, wired and wireless management, 802.1x support, isolation of devices, integration with IDS; it can be used to secure networks from small to large networks.

This tool can be used in the following areas:

  • banks
  • colleges and universities
  • engineering companies
  • convention and exhibition centers
  • hospitals and medical centers
  • hotels
  • manufacturing businesses
  • school boards (K-12)
  • telcos
  • plus many more…


Install PacketFence On Ubuntu 12.04 LTS

Create the packetfence repository file under /etc/apt/sources.list.d/ directory:

$ sudo nano /etc/apt/sources.list.d/packetfence.list

Add the following line:

deb precise precise

Save and close the file. Add the GPG keys using the following command:

$ sudo apt-key adv --keyserver --recv-key 0x810273C4

Then update the sources list and install packetfence:

$ sudo apt-get update
$ sudo apt-get install packetfence

This command will install packetfence and its all required dependencies. Once apt-get installed all the packages, reboot your server.

Configure PacketFence

Open up your browser and navigate to https://ip-address:1443/configurator/. You may see the following screen.

Configurator - PacketFence - Mozilla Firefox_001

You will be asked to select the enforcement mechanisms i.e type of your network devices. If you have unmanageable network devices, select Inline enforcement or if you have manageable network devices, select VLAN enforcement.

Here I select Inline enforcement.

Now it will display the number of network interfaces in your current system. You should assign interfaces for Inline and Management. Here i want to assign both interfaces for Inline, because i don’t have any manageable network devices.  To do that click on the respective network interface(eth0 or eth1) and select Inline or Management in the dropdown box called Type.

Once you assign all the network interfaces, click on Continue.

Configurator - PacketFence - Mozilla Firefox_007

Configurator - PacketFence - Mozilla Firefox_005

Next enter MySQL root user password and create a new database and user for PackerFence.

Configurator - PacketFence - Mozilla Firefox_010

Enter domain, hostname, DHCP server IP address and alerting email that can be used to receive critical alerts.

Configurator - PacketFence - Mozilla Firefox_011

Enter the Packetfence admin user password. Enter the password twice and click on Modify password to set admin password and then click Continue.

Configurator - PacketFence - Mozilla Firefox_012

Finally click on Start PacketFence link to start all Packetfence services.

Configurator - PacketFence - Mozilla Firefox_014

That’s it. Now PacketFence is ready to use now. For more information about further PacketFence administration, I suggest you to read the Administration Guide.

  • barhofesh

    Is this open source ?

  • SK

    Yes it is complete free and open source..

  • Mwandu Mwelwa

    hi – how is it different from Pf sense?

  • Juan Trujillo

    Dear SK,
    I don’t know which ip to use where you say https://ip-address/. Which internal IP address should I use? Where do I configure that?


  • SK

    Hi Juan, use the system ip address that you’ve installed packetfence.

  • Marco

    How to install PF on a raspberry?

  • SK

    If your Raspberry is running with rasbian, then the installation is same as described here.

  • armando

    Hello SK,
    Im using packetfence for my accesspoint network with non manageable switch at my office LAN. I have succesfully install and configure the packetfence with my ubuntu 12.04 box. Im having difficulty during the implementation where my user can access the portal via wifi device. i have create a user login and roles for accessing the captive portal. The error “wrong username and password” were display when they login the user id at the captive portal. So any suggestions and recommendation about this matters? Hope for you feedback soon. Thks