APF Firewall wont start on Ubuntu 11.10, Kernel 3.x

I recently setup an 64bit Ubuntu 11.10 install over at 6Sync for some development projects.  While it will probably not end up hosting anything of real importance and will be recycled shortly I figured it would still be a good idea to put a firewall on it to help aid in protecting it from bored script kiddies.
I have used APF many times in the past so that was the logical choice as I knew how to get it setup and running exactly as needed. Ubuntu provides a package for it so I ran an apt-get install… It installed fine, I then configured the conf.apf to my liking.  I started APF and it started almost instantly, which while my 6Sync VPS is pretty fast it shouldn’t have started nearly that fast. I checked out iptables and it was empty, I decided to have a look at the apf log and saw the following.

I saw that the APF install that was available in apt was outdated, while not by much it was a little behind. I figured I might try to download the newest build directly from their site as it was a bit newer. I removed the installed version, installed the new and it didn’t work either.  After some further searching I came across this bug report.  Per the information on the bug description the person advised editing the following file /etc/apf-firewall/internals/functions.apf and adding this code just after 2.6 check

After adding the code I restarted APF and it took a moment longer to load and then it was up and running.  I took a look at the iptables and all my rules had been implemented.    Thought that I would document it here for future reference as I am not sure if the link to the bug will be removed and it might save someone a few minutes of struggling to get it working.

 

  • Michael

    I too just had this issue and really appreciate your efforts to share the info. thanks

  • C

    I had the same problem. Seems to be corrected with version 2.7, but it is not the one in Debian Wheezy…

    • C

      v 9.7, sorry.