How to Install and configure APF (Advance Policy Firewall)?

How to Install and configure APF (Advance Policy Firewall)?


APF stands for Advance Policy Firewall is an application for protecting server. Many other firewall applications are available for protecting server in linux that is CSF [Config server firewall]. APF is firewall system that is based on netfilter. APF designed according to latest internet deployment server that is custom deployed linux installation. APF provide very powerful and robust firewall. APF is used the latest feature from netfilter. APF is based on policies under linux system.

APF follow three basic policies:

· Static firewall policies.

· Connection based policies.

· Sanity based policies.

Static firewall policies:

It is an traditional method that is used in unchangeable of set of rules firewall. For example when you allow an address to access on server based on trust system and open a new port with conf.apf. So the solution is that it never change while firewall is running.

Connection based policies:

Connection based policies refers to a policy that different packets for different connections. It allows that packet that has matching connection otherwise not allowed.

Sanity based policies:

The sanity based policy has the ability to match the pattern of traffic with known attack methods.

Features of APF:

· It used user id and application based network filtering.

· Used advanced syntax that is based on rule files.

· It used the debug mode for test new configuration setup.

· It used the dynamic configuration for your server local DNS resolver into the firewall.

· Provide optional filtering of p2p applications.

· Provide default setting for meet server setup.

· It has detailed configuration file.

· It use the advanced packet sanity checks to check traffic going and coming meets the strictest of standards.

· It provides optional filtering of reserved and private IP address space.

· Need to logging of every rule adding.

· It protects the system for further syn-flood attacks and routing abuses with the help of Configurable kernel.

· You can also create your own rules and add them with policies if you have knowledge of netfilter.

Commands of APF:

We define the commonly used commands that are as:

How to Install and configure APF on Linux System:

Follow the steps to install APF firewall for Linux system.

Step 1 :
first requirement of root SSH to access your server and login to server via SSH and Su to root user.

Step 2 :
enter into temporary folder run command cd/root/downloads.

Step 3 :
start to download and extracting the archive with APF simply follow the link.


Tar –zxvf

cd apf -9.7-1

Step 4:
after that run the following command to install it.


After run the command you will receive a massage that is “It has been installed”.

Step 5 :
the basic configuration file of APF is /etc/apf/conf.apf.

Step 6 :
you can edit the configuration file and set DEVEL_MODE=0” and restart the APF using the “apf -rcommand.
First release
Last update
0.00 star(s) 0 ratings