How to configure your VPS to use your DNS cluster

Modified on Wed, 13 Oct 2021 at 08:50 PM

Every VPS comes with access to our DNS cluster. You can control the settings in our cluster by using the AXFR protocol, which transfers the DNS settings from your VPS to our DNS cluster. Read more about the DNS servers of Yourwebhoster.eu.

The AXFR protocol allows you to transfer the settings from your DNS server (which can be managed by for example Cpanel an DirectAdmin) to our DNS cluster. This may sound difficult, but it is easy to setup. Also, you only have to configure the DNS in your control panel, which usually is done automatically, and you do not have to configure our DNS servers for a second time.

Configured Named/Bind for AXFR

Cpanel and DirectAdmin both support the DNS server named/Bind. Configuring Bind is done in just a few minutes.

  1. Open /etc/named.conf
  2. Replace
    allow-transfer { none; };

    with

    allow-transfer {46.249.37.254;};
    notify yes;
    also-notify {46.249.37.254;};
    allow-recursion { 127.0.0.1; };
    notify-source yourserverip;
    transfer-source yourserverip;

    Replace yourserverip with the main IP address of your server.

  3. Check if your firewall permits connections to and from the following IP's:
       46.249.53.249
       46.249.37.254
       It is possible that resolving the IP's will not work f connections from of to the IP address on port 53 is not allowed. Also, we regularly check if a domain still is active on your server. If we do not receive a record or can not access your server, the domain will get deleted from our DNS cluster.
  4. Restart named:
       service named restart
       Or starting from CentOS 7:
       systemctl restart named
  5. Done!

Starting from now all the existing and new records will get transferred from your server to our DNS cluster. Do note that it can take a few minutes to synchronise the settings.

Delete a domain name

To delete a domain name from our DNS cluster you can run the following command:

wget "https://yourwebhoster.eu/remove_domain/?domain=domain.com" -O /dev/null

Replace domain.com with your domain name. Note: it is important to use the same IP that is configured in named.conf. To fore the IP address, you can add —bind-address=yourip to wget:

wget "https://yourwebhoster.eu/remove_domain/?domain=domain.com" -O /dev/null --bind-address=178.21.20.23

Configuring DirectAdmin

In addition to the regular installation, you will need to add the following to DirectAdmin in order to automatically delete a domain name. First check if the files domain_destroy_post.sh and domain_change_post.sh already exist in /usr/local/directadmin/scripts/custom. If not, run the following commands:

echo '#!/bin/bash
/usr/bin/wget "https://yourwebhoster.eu/remove_domain/?domain=$domain" --no-check-certificate -O /dev/null >/dev/null 2>&1
exit 0;' >> /usr/local/directadmin/scripts/custom/domain_destroy_post.sh
echo '#!/bin/bash
/usr/bin/wget "https://yourwebhoster.eu/remove_domain/?domain=$domain" --no-check-certificate -O /dev/null >/dev/null 2>&1
exit 0;' >> /usr/local/directadmin/scripts/custom/domain_change_post.sh
chown diradmin:diradmin /usr/local/directadmin/scripts/custom/domain_destroy_post.sh
chown diradmin:diradmin /usr/local/directadmin/scripts/custom/domain_change_post.sh
chmod 755 /usr/local/directadmin/scripts/custom/domain_destroy_post.sh
chmod 755 /usr/local/directadmin/scripts/custom/domain_change_post.sh
The files do exist

Open the files with your favourite editors and add this to the top of the file but below #!/bin/bash.

/usr/bin/wget "https://yourwebhoster.eu/remove_domain/?domain=$domain" --no-check-certificate -O /dev/null >/dev/null 2>&1

Make sure that the file ends with exit 0; to prevent that a DirectAdmin user will see the wget output.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article