How to Whitelist an IP Address and Remove It from the Deny List in APF Firewall
To whitelist an IP address on other servers, run the following command:
apf -a 72.52.198.161
If the IP address is currently being blocked, you will need to remove it from the deny list first.
To remove the IP address from the deny list:
Open the deny hosts file with a text editor:
nano /etc/apf/deny_hosts.rules
- Press Ctrl + W to initiate a search, then enter the IP address 72.52.198.161.
- Once you locate the entry, remove both lines associated with the IP address.
- Save and exit the file by pressing Ctrl + X, then press Y to confirm.
Restart the APF firewall with the following command:
/etc/init.d/apf restart
By following these steps, you can ensure that the specified IP address is properly whitelisted and no longer blocked by the APF firewall.
Editing firewall configuration files can impact server accessibility. Ensure you have console access or another recovery method in case of misconfiguration.
For persistent changes, always verify that APF is set to reload rules on boot.