APF installation error on VPS : unable to load iptables module (ip_tables), aborting.

by Tweak on April 21, 2010
in Linux, Security

While installing APF on your VPS you get the following error :

apf -s
apf(13665): {glob} status log not found, created
apf(13665): {glob} activating firewall
apf(13744): {glob} unable to load iptables module (ip_tables), aborting.
apf(13665): {glob} firewall initalized
apf(13665): {glob} !!DEVELOPMENT MODE ENABLED!! – firewall will flush every 5 minutes.

You need to configure the APF for your VPS.

nano /etc/apf/conf.apf

modify
SET_MONOKERN=”0?

to
SET_MONOKERN=”1?
Read more…

Block IP Addresses With IPtables & APF

by Tweak on September 5, 2009
in Security, Servers

Have a user that keeps hammering your FTP or trying to login over and over and over again that you just want to ban and never see again? We’ll show a quick and dirty method to ban an IP address from the server.

We commonly receive questions like:
“I would like to ban that ip address to prevent the access to the server.
how can i ban that Ip address from the server?”

Simple !

Login to the server as root.

  1. If you are running iptables, you can enter:
    iptables -A INPUT -s IP_ADDRESS -j DROP
    Ex: Block IP 68.72.72.25
    iptables -A INPUT -s 68.72.72.25 -j DROP
  2. Read more…

Script to daily email APF status

by Tweak on June 15, 2009
in Security, Servers

You are running APF on your server, but sometimes you think “is APF running fine ?
This script sends you an email with APF satus.

Log in to your server as root

Create the script:
nano apfstatus.sh

Put this on the file:
#!/bin/bash

tail -200 /var/log/apf_log | mail -s "APF Status" youemail@domain.com

Save and Exit
Ctrl+X and Y
Read more…

How to install APF (Advanced Policy Firewall)

by Tweak on June 8, 2009
in Servers

What is APF (Advanced Policy Firewall)? APF 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: http://www.rfxn.com/projects/advanced-policy-firewall/

This guide will show you how to install and configure APF firewall, one of the better known Linux firewalls available.
Read more…