GICT knowledge base
APF Installation and Configuration
Published
In this documentation, we can check how to install APF on your server and its configuration. Advanced Policy Firewall (APF) is use to secure servers and workstations connected to the network.
INSTALLATION
1) Go to the directory “/usr/src/”.
root@localhost [~]# cd /usr/src/
root@localhost [/usr/src]#
2) Download the APF.
wget http://www.rfxn.com/downloads/apf-current.tar.gz
3) Extract the APF tar file.
tar xvzf apf-current.tar.gz
4) Go to APF directory.
cd apf-9.7-2
5) Install APF on the server.
sh ./install.sh
Then you will get the installation completed message.
Completed.
Installation Details:
Install path: /etc/apf/
Config path: /etc/apf/conf.apf
Executable path: /usr/local/sbin/apf
APF BASIC CONFIGURATION
1) Open APF configuration file.
vi /etc/apf/conf.apf
2) Enable DEVEL_MODE. For initial testing purposes, make sure DEVEL_MODE =”1″. When we are sure the firewall is setup correctly, we will set this to “0”
DEVEL_MODE=”1”
3) Allow TCP and UDP incoming and outgoing ports.
IG_TCP_CPORTS=”20,21,22,25,26,37,43,53,80,110,113,143,443,465,873,993,995,2077,2078,2082,2083,2086,2087,2095,2096,3306,6666″ – inbound TCP ports to open.
IG_UDP_CPORTS=”53,6277″ – inbound UDP ports to open.
EG_TCP_CPORTS=”21,25,37,53,80,110,113,#123,443,43,873,953,2089,2703″ – outbound TCP ports to open.
EG_UDP_CPORTS=”20,21,53,873,953,6277″ – outbound UDP ports to open.
4) Enable outbound packet filtering.
EGF=”1″
After making changes to the APF configuration file, save the changes.
5) Restart APF.
apf -r
That is how we can install and configure Advanced Policy Firewall on your server.
If you need any further help please reach our support department.
Related guides
How to Find Services That Need a Restart After Updates with needrestart
Find services using outdated libraries with needrestart on Ubuntu. Read restart reports, review automatic restart policy and plan maintenance safely.
Firewall and SecurityHow to Connect Two Servers Privately with WireGuard
Connect two servers with WireGuard and keep PostgreSQL on the tunnel. Verify peer traffic, private database access and denied public connections.
Firewall and SecurityInterServer HIPAA Hosting: BAA and Shared Responsibilities
Review InterServer HIPAA hosting responsibilities and download the BAA and provisioning checklist. Request service-specific coverage through a support ticket.
Firewall and SecurityHow to Sign and Verify Files with Minisign
Sign release files with Minisign, share an authenticated public key, verify downloads, and stop processing when signatures fail.
