IP blocks are always frustrating when it denies access to your DirectAdmin server.
Such security restrictions protect the server from unauthorized logins, hack attempts, etc.
To regain access, users need to know how to unblock the IP in DirectAdmin.
At Bobcares, we often get requests to unblock IP in DirectAdmin as part of our Server Management Services.
Today, let’s get into the details about how to unblock IP in DirectAdmin and see how our Support Engineers manage it and fix related errors.
How we unblock IP in DirectAdmin
Let’s check on how we remove the IP block in the DirectAdmin server. The IP block can be either at the DirectAdmin side or within the server firewall.
Remove IP from the DirectAdmin blacklist.
By default, DirectAdmin maintains a file at /usr/local/directadmin/data/admin/ip_blacklist. Too many failed login attempts or accesses to DirectAdmin port 2222 automatically add user IP address to this file. The setting that controls the number of failed attempts can be changed in DirectAdmin Panel:
Admin Level -> Admin Settings -> Blacklist IPs for excessive login attempts
To remove the IP block,
1. Initially, we SSH to the DirectAdmin server.
2. Then, we edit the ip_blacklist file to remove the IP.
vi /usr/local/directadmin/data/admin/ip_blacklist
3. At last, we save it and restart the DirectAdmin service.
/etc/init.d/directadmin restart
That removes the IP from the DirectAdmin blacklist.
Unblocking in firewall
In addition, sometimes the IP addresses may be blocked at the server firewall too. We can remove the IPs with the help of CSF.
To unblock an IP from the CSF, we use the following commands.
1. We first check if the IP is blocked by CSF.
csf -g IP_address
3. If the IP is denied, we run the below command to unblock it.
csf -dr IP_address
4. Finally. we restart CSF for the changes to take effect
csf -r
That’s it.
How we fixed the common errors
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while managing DirectAdmin servers.
Now, let’s see the major reasons for this DirectAdmin IP block related errors and how our Support Engineers fix the top errors.
1. Low Login failure attempts
Recently, one of our customers had a problem with DirectAdmin. He could not log in to DirectAdmin. The error said,
Debug mode. Level 2000
Accepting Connections on port 2222
Blocking blacklisted IP xxx.xx.xx.142x
On checking, our Support Engineers found that his IP was blocked because of excessive login attempts. Here the customer had set the failed login attempts to 5.
So, we had to unblock the IP address and this makes DirectAdmin accessible again. Here, we edited the Security settings in DirectAdmin and set the “Blacklist IPs for excessive DA login attempts” to 20.
2. Invalid login credentials inside WHMCS
Similarly, some customers may face a problem where they cannot log into DirectAdmin from the WHMCS billing software. A typical reason will be the IP block triggered by the security measure of DirectAdmin. Normally, this is can happen due to invalid login credentials inside WHMCS on the Setup > Products/Services > Servers > Edit page.
Therefore, we’ll remove the WHMCS server IP from /usr/local/directadmin/data/admin/ip_blacklist. This will fix the error.
[Need assistance in how to unblock IP in DirectAdmin? We’ll help you.]
Conclusion
In short, too many login failures lead to the blocking of the IP address in DirectAdmin. Then, we have to unblock these IPs manually. Today, we saw details about how to unblock IP in DirectAdmin and how our Support Engineers fixed this error.
0 Comments