How to Use IPv6 Address in DirectAdmin

As we all know that what is an IP address?. It is nothing but a logical numeric address that is assigned to each and every single computer, printer, switch, router, mobiles or any other device that is part of a TCP/IP-based network. An IP address is the most significant and important component in the networking phenomena that binds the World Wide Web (www) together. Direct Admin also supports IPv6 address from the version 1.37.0 onwards. Let’s look into how we can use IPb6 address in Direct Admin.


To Add IPv6 Address

This is the first step. In order to use IPv6, we have to tell the Direct Admin that we need to use IPv6 address instead of IPv4.

1) Login to the server via ssh as the root user.

2) Open the DirectAdmin configuration file

vi /usr/local/directadmin/conf/directadmin.conf

3) Find the ipv6 from the above configuration file. Then edit it as to 1 if it is mentioned as zero.


3) Save the configuration file.

4) Then the very next step is to restart the service for the same. Execute the below command.

service directadmin restart

You can also add this by from the front end.

1) Login to the DirectAdmin panel using username and password.

2) Adding the IP address to DirectAdmin is done the same way as with we adding the IPv4 address.

Select Admin Tools >> IP management. You can add the IPv6 address on the IP filed.

Please be noted that the netmask can only apply to an IPv4 address and should be ignored while adding an IPv6 address to the DirectAdmin.

By default, the netmask of the IPv6 address is /64. But it is not yet supported.

So that whenever we are adding the IPv6 address to the DirectAdmin, we need to use the full or short forms of the address. As we are giving in short forms of the address, the DirectAdmin will expand it to the full form of the IPv6 values. And please note that don’t give or use  around the IP address here.

It is just fine with 1:2::9

Now the DNS system is ready for IPv6. We have dns_a.conf file and dns_aaaa.conf file default records for newly created zones. Each of these template files will check on the IP type. When an IP is sent to the template, the IP type is also included, so the template can choose to ignore adding any records if the IP type doesn’t match its format, or (with customization) you can add some other value if you’d like. For most people, leaving it alone will be best.

How to Access the DirectAdmin via IPv6 address.

1) Login to the server via ssh as the root user.

2) Execute the following commands.

/sbin/sysctl net.inet6.ip6.v6only=0

3) Set this in the /etc/rc.conf:


4) Then verify with the sockstat command.

If it is working correctly, It will give an output as follows.

freebsd7-64# sockstat -l | grep direct | head -n1

nobody   directadmi 50362 0  tcp46  *:2222                *:*


freebsd7-64# sockstat -l | grep direct | head -n1

nobody   directadmi 50362 0  tcp6  *:2222                *:*

We have to get tcp46 in the output. If it is not, this means that the IPv6 is not enabled.

5) DirectAdmin should be restarted after this option is set.

For the apache service, it already supports IPv6. So that no need of changes here. But we have to modify the exim and dovecot. Exim does not support IPv6. So we need to ensure it is compiled in.

6) Run the following command.

/usr/sbin/exim -bV | grep Support

Then you will get an output like as follows.

Support for: crypteq IPv6 Perl OpenSSL move_frozen_messages Content_Scanning Old_Demime DKIM DNSSEC Event OCSP PRDR

7) If you are not seeing IPv6 in the output, then you’ll need to recompile exim, either using rpms, or from the source.  The latest Makefiles should have the required HAVE_IPV6=YES to ensure it’s included.

8) For the dovecot, edit the configuration file to the IPv6 support format.

vi /etc/dovecot.conf

9) Find out the following line.


listen = *

#IPv4 and IPv6:

#listen = *, ::

10) Change them to look like below.


#listen = *

#IPv4 and IPv6:

listen = *, ::

11) Then restart the dovecot.

service dovecot restart

12) For the older versions of dovecot

vi /etc/dovecot.conf

Add the following line.

listen = “*, [::]”


If you need any further help, please do reach our support department.