DirectAdmin

Add and assign IP addresses in DirectAdmin (admin)

Add IPv4 and IPv6 addresses in DirectAdmin IP Management, set them as shared or free, assign IPs to resellers and users, and change the server's main IP.

AdvancedDirectAdmin admin2 min read

DirectAdmin tracks every IP address on the server and who may use it. New IPs from your provider must be added in IP Management before resellers and users can use them – for example a dedicated IP for a customer's website or private nameservers for a reseller.

Before you start

  • Admin-level access.
  • The new IPs routed to your server by the provider, with the correct netmask. On a VPS, see VPS IP addresses.

Add an IP address

  1. At Admin Level, go to Server Manager → IP Management.
  2. Click Add IP.
  3. Enter the IP and Netmask (for example 255.255.255.0, or a prefix such as /64 for IPv6).
  4. Choose the network device if asked (usually detected automatically).
  5. Click Add. DirectAdmin brings the IP up on the interface and records it.

You can add a range by entering the first IP and the number of addresses, where the option is offered.

IP statuses

StatusMeaning
serverThe server's main IP
freeAvailable to assign to a reseller or user
sharedShared by several accounts (typical for websites)
ownedAssigned to one reseller or user

Assign an IP to a reseller

  1. In IP Management, tick a free IP.
  2. Choose Assign To and select the reseller.
  3. Confirm. The reseller can now share it among their users, use it for their nameservers, or give it as a dedicated IP.

Use Share to make an IP available as a shared IP to everyone.

Change a user's IP

  1. Go to Account Manager → List Users (as admin or the owning reseller) and click the user.
  2. Choose Modify User (or Change IP).
  3. Select the new IP and save. DirectAdmin updates the web server configuration and, if it hosts DNS, the zone files.

If DNS is external, update the domain's A records there at the same time.

IPv6

Add the IPv6 address in IP Management, then link it to an IPv4 address with Link IP. Linked IPv6 addresses are added automatically to the web server and DNS records (AAAA) of domains on that IPv4. Make sure outgoing mail on IPv6 has a matching reverse DNS, or keep mail on IPv4.

Change the server's main IP

When moving a server or replacing its primary IP, add the new IP first, then run DirectAdmin's IP swap script as root:

/usr/local/directadmin/scripts/ipswap.sh OLD-IP NEW-IP

Then update the licence IP with DirectAdmin and rewrite configs with CustomBuild (./build rewrite_confs).

Troubleshooting

  • IP added but unreachable: wrong netmask or the provider has not routed it yet.
  • Cannot delete an IP: it is still owned or used by accounts; move them first.
  • Sites on a new IP show the default page: rewrite configs and restart the web server.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.