How to add IP to the allow list in APF?

Pvnallly

Member
Jun 8, 2011
12
0
51
Hello,

I have a client whose ISP just put him on an IP that appears to be blocked by APF on my server. When I turn off APF, he can access the website and his emails, but when I turn APF back on, he is denied.

I have been trying to figure out how to configure APF to permit his IP range, but have been unsuccessful.

Can anyone assist me with the proper command (or file to edit) to add his IP range to the allowed IP list?

Please keep in mind, I am not a linux guru, so the use of detailed instructions would be appreciated!
 

fi77i

Well-Known Member
Aug 20, 2008
57
0
56
Uruguay
cPanel Access Level
Root Administrator
You just need to remove the IP from the deny list. Go to the console and type.

apf -u <client_IP>

If you want to add the IP to the allow list (not recommended in my opinion)

apf -a <client_IP>

If you want to add an IP range, you just can edit the allow hosts file, I think it is /etc/apf/allow_hosts.rules
Check the comments there I think there is one that explain how to add an IP range.

Have a great day!
 
Last edited: