Results 1 to 1 of 1
-
15th Jun 2014, 01:37 PM #1
How to install APF (Advanced Policy Firewall)
What is APF (Advanced Policy Firewall)?
APF is a policy based iptables firewall system designed for ease of use and configuration. It employs a subset of features to satisfy the veteran Linux user and the novice alike. Packaged in tar.gz format and RPM formats, make APF ideal for deployment in many server environments based on Linux. APF is developed and maintained by R-fx Networks: R-fx Networks || Linux Software & Blog
This guide will show you how to install and configure APF firewall, one of the better known Linux firewalls available.
Requirements:
- Root SSH access to your server
Lets begin!
Login to your server through SSH and su to the root user.
Code:1. cd /root/downloads or another temporary folder where you store your files. 2. wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz 3. tar -xvzf apf-current.tar.gz 4. cd apf-0.9.5-1/ or whatever the latest version is. 5. Run the install file: ./install.sh
.: APF installed
Code:Install path: /etc/apf Config path: /etc/apf/conf.apf Executable path: /usr/local/sbin/apf
We will go over the general configuration to get your firewall running. This isn't a complete detailed guide of every feature the firewall has. Look through the README and the configuration for an explanation of each feature.
We like to use DShield.org's "block" list of top networks that have exhibited
suspicious activity.
Code:FIND: USE_DS="0" CHANGE TO: USE_DS="1"
Cpanel Servers
We like to use the following on our Cpanel Servers
Common ingress (inbound) ports
Code:# Common ingress (inbound) TCP ports -3000_3500 = passive port range for Pure FTPD IG_TCP_CPORTS="21,22,25,53,80,110,143,443,2082,2083, 2086,2087, 2095, 2096,3000_3500" # # Common ingress (inbound) UDP ports IG_UDP_CPORTS="53" Common egress (outbound) ports # Common egress (outbound) TCP ports EG_TCP_CPORTS="21,25,80,443,43,2089" # # Common egress (outbound) UDP ports EG_UDP_CPORTS="20,21,53"
This should work on Ensim servers as stated by other users, although we can't guarantee it will work.
Common ingress (inbound) ports
Code:# Common ingress (inbound) TCP ports IG_TCP_CPORTS="21,22,25,53,80,110,143,443,19638" # # Common ingress (inbound) UDP ports IG_UDP_CPORTS="53" Common egress (outbound) ports # Common egress (outbound) TCP ports EG_TCP_CPORTS="21,25,80,443,43" # # Common egress (outbound) UDP ports EG_UDP_CPORTS="20,21,53"
8. Starting the firewall
Code:/usr/local/sbin/apf -s
Code:usage /usr/local/sbin/apf [OPTION] -s|--start ............. load firewall policies -r|--restart ........... flush & load firewall -f|--flush|--stop ...... flush firewall -l|--list .............. list chain rules -st|--status ........... firewall status -a HOST|--allow HOST ... add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall -d HOST|--deny HOST .... add host (IP/FQDN) to deny_hosts.rules and immediately load new rule into firewall
Stop the firewall from automatically clearing itself every 5 minutes from cron.
We recommend changing this back to "0" after you've had a chance to ensure everything is working well and tested the server out.
Code:vi /etc/apf/conf.apf FIND: DEVM="1" CHANGE TO: DEVM="0"
Code:Restart the firewall: /usr/local/sbin/apf -r
To autostart apf on reboot, run this:
Code:chkconfig --level 2345 apf on
Code:chkconfig --del apf
Areon Reviewed by Areon on . How to install APF (Advanced Policy Firewall) What is APF (Advanced Policy Firewall)? APF is a policy based iptables firewall system designed for ease of use and configuration. It employs a subset of features to satisfy the veteran Linux user and the novice alike. Packaged in tar.gz format and RPM formats, make APF ideal for deployment in many server environments based on Linux. APF is developed and maintained by R-fx Networks: R-fx Networks || Linux Software & Blog This guide will show you how to install and configure APF firewall, Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to install APF
By Webmin in forum Server ManagementReplies: 2Last Post: 30th Nov 2011, 03:54 AM -
How to install openvz on CentOS 5.3 32bit
By Nikolasr in forum Server ManagementReplies: 9Last Post: 6th Jul 2009, 03:13 AM -
how to install a custom script on vB?
By royalmarine in forum Webmaster DiscussionReplies: 1Last Post: 29th Jan 2009, 07:27 PM -
how to install Vb !
By Sanny in forum vBulletinReplies: 5Last Post: 24th Aug 2008, 03:50 PM -
How To Install a vB Skin
By WrzBB in forum vBulletinReplies: 1Last Post: 12th Feb 2008, 10:49 AM
themaCreator - create posts from...
Version 3.23 released. Open older version (or...