Personal tools

Installing FreeBSD Packages

From PFSenseDocs

Jump to: navigation, search

In addition to the packages available in the pfSense package system, thousands of additional FreeBSD packages are available. If strong security is what you want out of your pfSense firewall then do not install additional FreeBSD packages, or ensure you properly maintain these packages by always keeping them up to date. This is especially true of packages that act as servers, listening for network requests. Packages only accessible from the local system, such as command line utilities, are usually of less risk though they can also open security holes.

These packages are not supported by the pfSense development team. They may break your firewall, be careful.

First SSH into the firewall, and choose option 8 at the console.

If you attempt to use pkg_add command your download will not start. With a little editing you can download. I selected the folder Latest from ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/.

If you are running amd64, replace i386 with that instead.

I found a great package I want called iftop. I type at the prompt:

pkg_add -r 

And the I paste the url to the package I want

ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/iftop.tbz

I end up with

pkg_add -r ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/iftop.tbz

Hit enter and the download will commence.

Run the following:

rehash

And the package will be available.

iftop -i (interface)

NOTE on startup scripts: the usual rc.d scripts added to /usr/local/etc/rc.d/ will not function on a pfSense system. There is no rc.conf and you cannot create one as it will be deleted. You'll need to create your own startup script in /usr/local/etc/rc.d/ just making sure it ends with .sh and is marked as executable (chmod +x), and it will run at boot time. Alternatively if it's something that can be started with a single command you can easily add a <shellcmd> tag to your config.xml.

Alternate Package Sites

The FTP archive site above contains official FreeBSD packages for FreeBSD 8.1, upon which pfSense 2.0.x is based. These files are several years old now, and some may have security issues. There is an unofficial site that contains more up-to-date FreeBSD binary packages for FreeBSD 8.1 that can be used if you need a more current version and are willing to trust the security of the site. The packages can be found here:

amd64: http://ftpmirror.your.org/pub/FreeBSD-Unofficial-Packages/81amd64-mini-nox11/Latest/

i386: http://ftpmirror.your.org/pub/FreeBSD-Unofficial-Packages/81i386-mini-nox11/Latest/

As always, the best option is to build your own packages if you can.