In this tutorial:
In this Dedicated Hosting tutorial we will cover basic APF commands. The basic commands include Allowing IP’s, Blocking IP’s, and Unblocking IP’s. After explaining what the command does, we will show you an example of the APF Command.
Note that you will require root access in order to use these commands.
Allowing IP Addresses in APF
- Log into your server via SSH.
- Here is a breakdown of the the APF command for allowing IP’s in APF:
- Log into your server via SSH.
- Here is a breakdown of the the APF command for blocking IP’s in APF:
- Log into your server via SSH.
- Here is a breakdown of the the APF command for unblocking IP’s in APF:
apf -a
Below is an example of the command (highlighted in red) in your shell instance:
[email protected] [~]# apf -a 123.456.789 Allowing Office IP
Blocking IP Addresses in APF
apf -d
Below is an example of the command (highlighted in red) in your shell instance:
[email protected] [~]# apf -d 123.456.789 Blocking Office IP
Unblocking IP Addresses in APF
apf -u
Below is an example of the command (highlighted in red) in your shell instance:
[email protected] [~]# apf -u 123.456.789
Congratulations, now you are familiar with the basic APF including Allowing IP’s, Blocking IP’s, and Unblocking IP’s.
Where is the guide to ban countries? I have over 400 ips to add tonight.
We do not have a specific guide for using APF to block countries. However, I will note this as a guide we should create for you. Thanks for your feedback!