Setup dns server centos 6




















As soon as named has started successfully, we'll want to ensure that it is enabled as a startup service, by running the following command:. At this point, we should have a fully operational primary nameserver. You can verify that BIND is working correctly by running this command, obviously replacing 1. If you recieve a response which includes an answer and authority section, your nameserver has been configured correctly. Now that our primary nameserver has been configured, we'll now setup a slave nameserver on our cloud server.

We can start installing BIND and it's utilities on the second cloudserver, in the same way as we did the first. We'll proceed by opening named. This directive is really unnecessary as we will only be transferring records from our primary name server.

As soon as you have configured the slave server, we'll start named. Once again, this may take a couple of minutes while our rndc. As with the first cloud server, we want to assure named is set to run at startup with the following command:. Your slave nameserver should be all up and running now.

You can double check that it is fully operational by using the dig command again, replacing 2. To our luck, the CentOS package makes this incredibly simple. The only aspect worth nothing is that active paths for BIND will change to their chrooted equivelants, e.

If you wish to enable this feature for added security which it is able to provide, you can just run the following command:. When your website has outgrown your shared hosting plan All our VPS plans come completely unmanaged unless you buy a managed service addon.

What it means All VPS packages come with the operating system of customer choice preinstalled. The customer can Step 1: To reboot your virtual machine, go to the client area, and click the "My Services" To monitor your traffic on your virtual machine, go to the client area, and click the Configure BIND Zones Firstly, we'll need to open the zone file, using the name you specified in the configuration above.

IN NS ns2. Dig 1. Slave Nameserver Configuration Now that our primary nameserver has been configured, we'll now setup a slave nameserver on our cloud server.

If you wish to enable this feature for added security which it is able to provide, you can just run the following command: yum install bind-chroot -y service named restart. For example, we've used San Francisco 1 and New York 1. For the purpose of this guide, it will be assumed you are configuring both a primary and secondary name server. It is worth noting that if you are managing a large number of domains this may not be the most viable solution, as you will need to manually add domains on both the master and slave nameservers.

With that said, running your own nameservers is a great way to have more direct control over your hosting infrastructure, and assert full control over your DNS records. As with any new server, it's always important to ensure your system is up to date.

You can verify this by checking for updates using yum as follows:. Note: In DigitalOcean, we call our cloud servers as "droplets". We will use both terms throughout this tutorial. Your "options" section should appear as follows, replacing 2. Above, listen-on must be commented to listen on all available interfaces. Recursion should be turned off to prevent your server from being abused in "reflection" DDoS attacks.

The allow-transfer directive whitelists transfers to your secondary droplet's IP. Furthermore, we have changed the allow-query directive to "any" in order to allow users proper access to hosted zones. Next, we'll want to add a new zone for our first domain, you should add the following to your named.

Firstly, we'll need to open the zone file, using the name you specified in the configuration above. Ex: mydomain. We'll add the following contents to our newly created file. You should replace the applicable information with your own, where 1.

You are free to add additional entries in the same format. We can now start named for the first time. This may take several minutes while named generates the rndc. Once named has started successfully, we'll want to ensure that it is enabled as a startup service, by running the following:.

By now, we should have a fully operational primary nameserver. You can verify that BIND is working correctly by running the following command, replacing 1. If you recieve a response which includes an answer and authority section, your nameserver has been configured correctly. With our primary nameserver configured, we'll now setup a slave nameserver on our second cloud server. As always, please assure your system is up to date by checking for updates with yum as follows:.

We can start by installing BIND and related utilities on the second droplet, in the same manner as the first:. We'll proceed by opening named. This directive is unnecessary as we will only be transfering records from our primary name server. We will add the zone we configured on the first droplet, this time changing the "type" directive to slave, instead of master. You should replace "1.

After configuring our slave zone, we'll start named. Again this may take several minutes while our rndc. As with the first cloud server, we want to assure named is set to run at startup with the following:. Your slave nameserver should now be up and running.

You can verify that it is fully operational by using dig again, replacing 2.



0コメント

  • 1000 / 1000