At the Registrar:
1. Pick a domain that you own to use for a DNS server.
2. Go to your registrar and log in.
3. Go to a screen called manage my domain or domain management (You are looking for the screen that lets you make changes to an already registered domain)
4. Go to the option Register DNS Server, Create DNS Server, Register Nameserver, Domain Host Summary, or something similar -- NOT Edit DNS Servers or Modify DNS Servers, you will use that later -- and fill out the form.
5. The next screen or two will ask for both your IP address provided by your server provider when you signed up. and the name of your name server (for example “ns1”). Just follow their prompts.
6. The DNS system requires you to register at least two nameservers, so you need to repeat the steps at least once.
Example:
Here are some video's listed for the most known registrars:
http://www.demodemo.com/tutorials_dnsns.html
At Directadmin:
Step 1: Set a main domain name
By default, no web site is associated with your server.
1. Sign into your control panel at http://<server ip>:2222 as the admin user.
2. Switch to the User panel (link is near the top right of screen)
3. Click the "Add Another Domain" text link.
4. Enter your domain name into the box and click Submit.
Step 2: Create nameservers
1. Add at least one additional IP address to your sever.
Sign into DirectAdmin as the admin user, then select IP Manager from the menu. To add an IP address, enter the IP address in the "IP" field, then click the "Add IP" button. Then, place a checkmark next to all the IP addresses and click the "Assign to [username]" button at the bottom of the screen. Your Admin username should be in the dropdown menu.
2. Create the nameservers.
Switch to your Reseller panel (near top right of screen) and click the Name Servers icon. If there happen to be any nameservers currently listed, delete them first by placing checkmarks next to them and clicking the "Delete Nameservers" button.
Place checkmarks next to any two IP addresses and then click the "Create Nameservers for" button, selecting the domain you want the nameservers for.
3. Tell DirectAdmin that these will be the primary nameservers.
Switch back to the Admin panel and click Admin Settings. Make sure the NS1/NS2 fields are accurate, and then click "Save."
In SSH:
In SSH there need a few things be checked to make sure the nameservers will work.
1. Check if your firewall doesn't block port 53 bot TCP/UDP and In/Out
2. Also check if your IP's are both configured (use "ifconfig" for this).
Ok when you did everything right at DirectAdmin You shouldn't have to do more than this:
1. Edit /etc/named.conf
First add this line on top:
Then find this line in the file:
Copy this code and paste 2 time beneath the line:
Now change the beneath 2 line with your nameserver IP's:
Something like that
Now you will find these 2 line more below:
Delete the "allow-query { localhost; };" line and you want to change the "recursion yes" to "allow-recursion { trusted; }". And add 2 news lines:
This is what it will look like now:
This is because you want to be able to ping other domains from your own server so you want to made it open only for your own server. It will also deny all DNS requests for domains you don't have and from IP's you don't know to make sure they don't start using your dns.
Now save that named.conf and open /etc/resolv.conf in vi. edit it to have both the nameservers in it:
Ok this is all you would need to do to get your nameservers working. If I missed a part of there are some things that aren't clear please post them here.
1. Pick a domain that you own to use for a DNS server.
2. Go to your registrar and log in.
3. Go to a screen called manage my domain or domain management (You are looking for the screen that lets you make changes to an already registered domain)
4. Go to the option Register DNS Server, Create DNS Server, Register Nameserver, Domain Host Summary, or something similar -- NOT Edit DNS Servers or Modify DNS Servers, you will use that later -- and fill out the form.
5. The next screen or two will ask for both your IP address provided by your server provider when you signed up. and the name of your name server (for example “ns1”). Just follow their prompts.
6. The DNS system requires you to register at least two nameservers, so you need to repeat the steps at least once.
Example:
Code:
Primary DNS Server: ns1.mydomain.net on IP address 83.45.0.1
Secondary DNS Server: ns2.mydomain.net on IP address 83.45.0.2
http://www.demodemo.com/tutorials_dnsns.html
At Directadmin:
Step 1: Set a main domain name
By default, no web site is associated with your server.
1. Sign into your control panel at http://<server ip>:2222 as the admin user.
2. Switch to the User panel (link is near the top right of screen)
3. Click the "Add Another Domain" text link.
4. Enter your domain name into the box and click Submit.
Step 2: Create nameservers
1. Add at least one additional IP address to your sever.
Sign into DirectAdmin as the admin user, then select IP Manager from the menu. To add an IP address, enter the IP address in the "IP" field, then click the "Add IP" button. Then, place a checkmark next to all the IP addresses and click the "Assign to [username]" button at the bottom of the screen. Your Admin username should be in the dropdown menu.
2. Create the nameservers.
Switch to your Reseller panel (near top right of screen) and click the Name Servers icon. If there happen to be any nameservers currently listed, delete them first by placing checkmarks next to them and clicking the "Delete Nameservers" button.
Place checkmarks next to any two IP addresses and then click the "Create Nameservers for" button, selecting the domain you want the nameservers for.
3. Tell DirectAdmin that these will be the primary nameservers.
Switch back to the Admin panel and click Admin Settings. Make sure the NS1/NS2 fields are accurate, and then click "Save."
In SSH:
In SSH there need a few things be checked to make sure the nameservers will work.
1. Check if your firewall doesn't block port 53 bot TCP/UDP and In/Out
2. Also check if your IP's are both configured (use "ifconfig" for this).
Ok when you did everything right at DirectAdmin You shouldn't have to do more than this:
1. Edit /etc/named.conf
First add this line on top:
Code:
acl trusted { 127.0.0.1; };
Then find this line in the file:
Code:
listen-on port 53 { 127.0.0.1; };
Copy this code and paste 2 time beneath the line:
Code:
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 127.0.0.1; };
Now change the beneath 2 line with your nameserver IP's:
Code:
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 83.45.0.1; };
listen-on port 53 { 83.45.0.2; };
Now you will find these 2 line more below:
Code:
allow-query { localhost; };
recursion yes;
Delete the "allow-query { localhost; };" line and you want to change the "recursion yes" to "allow-recursion { trusted; }". And add 2 news lines:
Code:
allow-transfer { trusted; };
allow-notify { trusted; };
This is what it will look like now:
Code:
allow-recursion { trusted; };
allow-transfer { trusted; };
allow-notify { trusted; };
This is because you want to be able to ping other domains from your own server so you want to made it open only for your own server. It will also deny all DNS requests for domains you don't have and from IP's you don't know to make sure they don't start using your dns.
Now save that named.conf and open /etc/resolv.conf in vi. edit it to have both the nameservers in it:
Code:
# resolv.conf
# Can only have three servers active
nameserver 127.0.0.1
nameserver 83.45.0.1
nameserver 83.45.0.2
Ok this is all you would need to do to get your nameservers working. If I missed a part of there are some things that aren't clear please post them here.
Last edited: