How to Compile IPFire Firewall on Ubuntu 14.04

In our previous article we have installed and configured the IPfire firewall on the virtual machine (VM). However, in this article our focus is the compilation of IPfire on the Ubuntu platform. Following could be the reasons of IPfire compilation from source code.

  • Removal/Addition of features
  • Writing new plugins
  • Update packages like Linux kernel
  • Customization in the GUI/Dashboard etc

Prerequisite for environment setup

Following are prerequisites to compile IPfire from source code.

  • Ubuntu 14.04 LTS
  • git gcc g++ make bzip2 byacc bison gawk packages should be installed on the build system
  • almost 4 to 6 GB RAM
  • significant disk space.

IPfire can be compiled on other Linux distributions. However, following snapshot shows that Ubuntu 14.04 LTS is installed on the development system.

Ubuntu 14.04 LTS

Git package should be installed to download IPfire source code on the system.

# apt-get install git gcc g++ make bzip2 byacc bison gawk

Download Source Code

IPfire uses two repositories for two major versions.

  • IPFire 2.x
  • IPFire 3.x

As shown in the following snapshot that IPfire 2.x repository is used during compilation process.

# git clone git://


After downloading IPfire source code, next step is to grab the source code of used package. Run following command inside the root directory of IPfire source tree to download packages.

# ./ downloadsrc

Above command will download source packages of 500MB size.


Now, download pre compiled toolchain on the development system. Toolchains are available for  32 & 64 bit systems. Run following command to download toolchain on the system.

#./ gettoolchain


As shown in the above figure that toolchain is already downloaded on the system.

Build Process

After downloading source code and toolchain, next step is start build process. Following command will start the build process. Build process checks following things before compiling the source code.

  • build command must be run by user root.
  • significant disk space should be available

IPfire Build step is time-consuming and it takes 5-6 hours on my development system. Therefore, it is recommended to use development system with huge specification to reduce the build time.

As shown in the following figures, there are several stages in the build process.

#./ build

Building LFS


Building IPFire


Building Installer and Packages


Finally build process is completed as shown in following snapshot. It also shows the time taken during build process is 38 minutes. However, first time it will take 5-6 hours to complete the compilation of IPfire .


As shown in the following figure, an iso file is created under the root directory of IPfire source code.


MD5 checksum of the newly created iso file is shown in the figure.


Finally, compilation of IPfire from the source code is completed and ready to install in the VM. It is recommended to login as a root on development system to run  build process.

IPfire Installation

As shown in the figure, newly created iso file is used in the VM to install IPfire.


Following snapshot shows the IPfire installation from newly created iso file.


The details of IPfire installation using iso file and configuration is available on the previous article on IPfire.

After successful installation of IPfire, web interface is accessed in the browser for further configuration. IP address of green interface and port 444 is used to access the main dashboard. Accept the untrusted certificate  exception to view the web interface.


Bottom of the index page shows that IPFire 2.19 is installed on the VM. It is a development build which is compiled on i586 (32bit) system.


In this interesting tutorial we have set up development environment and compiled a well-known linux firewall 'IPfire' from scratch on the Ubuntu platform and it can be compiled easily on the other linux distributions. IPfire team have already provided necessary details to compile it from source code. The purpose of compilation is to add or remove new features or plugins, update critical packages such as linux kernel, patch security tools such as openssl and customization in the front-end. Compilation of IPfire from source code is one of the big advantage of IPfire project over  Endian and PFsense firewall.

Shah 3:00 am


Your email address will not be published. Required fields are marked *


  1. Hi , you did such a great work to understand how compilation works for ipfire.

    so when can i change the front end or add/remove package. i don't see any front end file in source code. please can you point where are those front end files in ipfire download source code.

    Thank you. any advice would be greatly appreciated.

  2. ipfire services can be remove by hackers, ipfire should lock all files to they cant be remove by internet, that must be a register mac address that can disable serveices, i had rebuild ipfire 15 times in one week becuase ids is being remove from system all files are remove and u cant just reinstall it wont work, ipfire should be hack proof, that meens a back up system running at same time that if a services wont start it swaps it out and then repairs it would have run in a type of vr and encripted so no one read the files so as long as it on line, take it off line u can do what ever matance u need it is badly made becuase no way to protreck it ,