http://www.linuxplanet.com/linuxplanet/tutorials/6942/1
Linux-powered Packet Fence Protects Your NetworkInstallation and Initial SetupDecember 29, 2009 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:
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. Installing dependencies 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:
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:
After yum is done, you must execute a file using the following command to complete the installation:
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:
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:
Once you have the intial configuration complete, start up PacketFence with the following command:
Configuring PacketFence 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 If you run into problems, you might want to check out the official documentation. They give examples of many different scenarios. Plus you can communicate on the mailing lists. 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. |