How to unblock your IP?

By Ah Hock - March 17th 2014 17:50 PM GMT+0800

Assuming you have subscribed to a dedicated server or Cloud VPS server running Linux and apf-bfd, the below tips can come handy when you experienced locked out of your own box.

Another assumption is that you allow SSH access to your server, and you use APF-BFD to restrict access and protect yourself from brute force attacks. APF-BFD stands for Advanced Policy Firewall coupled with Brute Force Detection,

Command to check if your IP is block.
Say if your IP is

Log into server via SSH as root via another computer with a different IP.

Put the command below to check if your IP is being blocked.

iptables -L -n | grep

If the below result shows, it means your IP is being blocked.

DROP all --
DROP all --

Now let us unblock your IP.
Assuming that you are using APF, please run the below command.
apf --remove

If the below result shows, it means your IP is being unblocked.
apf(22011): {trust} removed from trust system

Then, restart apf using command below:
apf -r

The below result will shows.
apf(22211): {glob} flushing & zeroing chain policies
apf(22211): {glob} firewall offline
apf(22246): {glob} activating firewall
apf(22286): {glob} unable to load iptables module (ip_tables), aborting.
apf(22246): {glob} firewall initalized

Give this command to whitelist your IP
apf -a

- END -