Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running APF on my centos (with cpanel) server and I am having trouble unblocking an ip. I have added the ip to allow_hosts.rules made sure it doesnt apear in deny_hosts and restarted APF however as soon as it is restarted the ip remains blocked if i stop apf or flush ip tables, the ip is not blocked. When firewall is running i cnt even ping the ip from my server.

Any advice would be appreciated

share|improve this question

closed as off-topic by HopelessN00b, kasperd, HBruijn Feb 24 at 18:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

when you block an IP it gets added to the deny_hosts.rules file. This is a simple text file, edit it and remove the IP. restart APF and you're done.

Alternatively, try apf --remove <host> which does the same thing (but doesn't require restarting APF).

If the IP is not in either of the APF rules files, then its probable something else is adding it to the iptables rules. APF is a wrapper to iptables, it just provides a means of adding new rules in a more user-friendly fashion. It does not 'take control' of the firewall.

share|improve this answer