Linux-powered Packet Fence Protects Your Network
Installation and Initial Setup
PacketFence is a free and open source network access control (NAC) system. This Linux-based application primarily provides network access control, monitoring, and intrusion detection. It gives you several network protection features, which includes the following:
- Captive portal: Can be used to require users to login before using the network or to present instructions to a user on a web page, blocking all other network traffic, when a problem is detected.
- Malware detection and alerting: Along with internal features, PacketFence can work with remote sensors like from Snort.
- Vulnerability scans with Nessus: Can use the external Nessus program to periodically run vulnerability scans.
- Isolation of problematic devices: One of the several isolation techniques PacketFence support is VLAN isolation (with VoIP support), where problematic clients would be moved to a designated VLAN. Switches from many vendors are supported.
- DHCP fingerprinting: Used to automatically allow or disallow specific device types (such as VoIP phones or Wi-Fi equipped game systems).
In this tutorial, we'll see how to set up and get started with PacketFence.
Some prerequisites are verifying that your network switches, access points, and controllers are supported by PacketFence for full-functionality. Additionally, make sure the computer you're setting up as the PacketFence server has at least two wired Ethernet cards installed.
We're using the CentOS 5.3 Linux distribution, so instructions are given with this in consideration.
First you must ensure you have the other servers and applications that PacketFence uses installed and ready to go. This includes a database server (MySQL) and web server (Apache) and maybe also a DHCP server (ISC DHCP), DNS server (BIND), and NIDS (Snort).
Open a Terminal window (Applications > Accessories) and enter root mode: type su, hit Enter, input the root password, and hit Enter again.
Then you can run the following command to install most of the required and optional software:
yum install mysql-server httpd dhcp bind
You'll have to manually install snort. Plus keep in mind, the mySQL server is installed with no password for root access, so you'll want to assign a password.
You must configure yum to use the DAG repository, so it can download and install the necessary dependency packages. You need to know the Red Hat Linux version you're using; here's the command to check it:
Now you can get the command to install the proper rpmforge-release package from the DAG site.
Now you can configure yum with the PacketFence repository. To do this, type gedit while still in root mode. This brings up the text editor with root privileges, so you can write to the particular location.
Now copy and paste the following into the text editor:
Then save the file to /etc/yum.repos.d/PacketFence.repo.
Before you close the root-mode text editor, you might want to check the status of SELinux. For PacketFence to work, SELinux must be disabled on your Linux distro. In Fedora Core and RedHat Enterprise distros, you can edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled and then reboot the system.
For the other distros that don't have the /etc/selinux/config file, you can edit the kernel boot line, usually in the /boot/grub/grub.conf file for the GRUB boot loader. On the kernel line, add selinux=0 at the end. Then reboot the PC.
Bring up a Terminal in root mode again and enter the following command to install PacketFence and its dependencies:
yum install packetfence
After yum is done, you must execute a file using the following command to complete the installation:
cd /usr/local/pf/ && ./installer.pl
Be sure to create an account for the web administrative interface when prompted, otherwise the default password of qwerty will be used. After installation is complete, you must run the following command to perform the configuration:
Next, startup the web server so you'll be able to access PacketFence's web-based control panel:
/sbin/service httpd start
PacketFence can authenticate users that register devices using three different methods: a flat file (the default method), an LDAP server, or a RADIUS server.
The default flat file is at /usr/local/pf/conf/user.conf. You'll have to encrypt the password of each user with htpasswd by entering the following command and entering the password twice:
htpasswd /usr/local/pf/conf/user.conf newuser
Once you have the intial configuration complete, start up PacketFence with the following command:
/sbin/service packetfence start
You can configure PacketFence using its command-line utility, pfcmd, or via the web-based control panel.
You can access pfcmd at /usr/local/pf/bin/pfcmd. Returning no options will give you the basic help screen, a listing of all the commands.
To access the web-based control panel, go to the following URL:
Use the username and password you created when running the installer.pl script; otherwise use the default username admin and default password qwerty.
Getting help with PacketFence
Eric Geier is the Founder and CEO of NoWiresSecurity, which helps businesses easily protect their Wi-Fi network with enterprise-level encryption by offering an outsourced RADIUS/802.1X authentication service called AuthenticateMyWiFi. He is also the author of many networking and computing books for brands like For Dummies and Cisco Press.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative