A Guide to Fixing the DirectAdmin Error “Cannot Assign Requested Address”

A Guide to Fixing the DirectAdmin Error “Cannot Assign Requested Address”

As an admin responsible for maintaining servers and websites, there’s a high chance that you run some sort of errors. One such error is the DirectAdmin error with the message reading “Cannot assign requested address”. If you’re stuck with this error, this article is for you. Here, we explain how to fix this error in shortest amount of time.

Installing DirectAdmin

The first thing you need to do is install DirectAdmin. You do this running the following code:

Code:
bash <(curl -Ss https://www.directadmin.com/setup.sh || wget -O - https://www.directadmin.com/setup.sh) auto
It will install everything for you automatically including the CSF Firewall.

You can also execute the code without the “auto” option. This would allow you to customize the package.

Please note that the hostname shouldn’t be the same as primary domain name. So instead of mydomain.com, you should use server.mydomain.com.

Using the same domain for server would result in email and FTP errors. Furthermore, make sure the hostname resolves after you set up DNS.

Fixing the “Cannot Assign Requested Access” Error

When you get this error, you should know that the IP address specified for the install isn’t a credible or valid IP address on the machine. So there’s a mismatch.

If you’re using a LAN or a NAT connection with an IP address other than what is mentioned, then it would be visible on the internet.

To fix this issue, when you’re asked about the Ethernet device, you need to provide details about the device that has the LAN IP. This is often eth0, ens192, venet0, and things along those lines. Then, provide the external license IP instead of the LAN IP when prompted.

To test this, run the following command:

Code:
wget –bind-address=1.2.3.4 http://www.directadmin.com/index.html

wget http://www.directadmin.com/index.html
1.2.3.4 should be the IP address of your license file. Here, if you’re still receiving the error after using the -bind-address option, then either the IP is absent or invalid in your device.

The second wget command works from within a LAN connection.

To see a list of IPs present in your network device, run this command -
Code:
/sbin/ifconfig
If you see the IP address that’s in your license file on the list, everything is working correctly. You should no longer see the error message.

So that’s how to fix this DirectAdmin error.
Author
kumkumsharma
Views
279
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top