Page 1 of 2 12 LastLast
Results 1 to 20 of 24

Thread: HOWTO: Setup your nameservers (Real Beginners Guide)

  1. #1
    Join Date
    Jul 2008
    Posts
    80

    HOWTO: Setup your nameservers (Real Beginners Guide)

    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:
    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
    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:
    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; };
    Something like that

    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 by rjd22; 12-08-2010 at 01:00 AM.

  2. #2
    Join Date
    Jul 2008
    Posts
    80
    Edit on main post:
    I added the posibility for localhost to use recusive so it can ping to other servers.

    I wish someone would comment on it..... I bet there are still some points to improve.

  3. #3
    Join Date
    Dec 2009
    Location
    Croatia
    Posts
    18
    I don't have these options in my named.conf...
    Or they have been changed since 2008...

  4. #4
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    Quote Originally Posted by IcyTexx View Post
    I don't have these options in my named.conf...
    Or they have been changed since 2008...
    These are NOT default options. You can follow the instructions to add them if that's what you want.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  5. #5
    Join Date
    Dec 2009
    Location
    Croatia
    Posts
    18
    Quote Originally Posted by jlasman View Post
    These are NOT default options. You can follow the instructions to add them if that's what you want.

    Jeff
    Yeah, I see... But I couldn't find those lines which were specified in the guide (the ones I needed to delete, put new lines after them, etc.).

    But I've set up nameservers in my own way and they actually work now. I'm surprised, because I never manage to do it (because of the waiting time in which everything needs to be resolved with the ISP and the domain registrar, I usually mess things up as a result of my impatience).

  6. #6
    Join Date
    Dec 2009
    Posts
    1

    help w dns change and ips

    We are switching internet providers to a new t1 line. Need to know if there are step by step instruction to put d.a servers on new ips without a lot of downtime?

    Thankyou

  7. #7
    Join Date
    Feb 2006
    Posts
    296

  8. #8
    Join Date
    Dec 2009
    Posts
    1

    name server

    please help me i have registered a new domain name and i am trying to link this up with my direct admin account that i already have two websites on.
    i need to tell the domain company that i registered the webiste with the address of the new name servers. i ahve absolutely no idea how to link this can someone help me please?

  9. #9
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    Whatever nameservers you're using for your current domain(s).

    Once that's done you need to create an alias in DirectAdmin. If you don't know how to do that, check with your hosting company.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  10. #10
    Join Date
    Dec 2010
    Posts
    2
    Ok I am a complete beginner at this. I got all the way to where it says "In SSH", where exactly and what exactly is this?

  11. #11
    Join Date
    Dec 2010
    Posts
    2
    Ignore that last comment google is my friend. But I do not understand why the need to go into SSH and edit this file. The whole point of DA is so you do not have to do this correct? I have seen guides like this that do not include the editing of SSH. Also my named.conf doesn't have some of the lines you mentioned. which made this a "not so beginners guide".

    So yeah, the SSH thing confused the hell out of me.

  12. #12
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    I'm guessing that different OS distributions use different named.conf file. Perhaps DirectAdmin should install it's own named.conf file no matter what is already there, early in the installation. This would of course nullify any changes your distribution may have made, and may cause more problems than it solves.

    Perhaps DirectAdmin staff will look into doing it's own complete BIND setup, removing any that's already there. Which of course could come with it's own problems if your default named.conf file already has machine or domain specific settings.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  13. #13
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    2,839
    Which of course could come with it's own problems if your default named.conf file already has machine or domain specific settings.
    That might not have to be an issue if DA copy's an existing named.conf to named.conf.orig (or .bak or something) before writing it's own.

    A bit of an admin can copy specific needed things back in the DA's named.conf then later.
    Greetings, Richard.

  14. #14
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    I agree, and on new installs we've been using our own version of named.conf for some time now, but only DirectAdmin Staff can decide to do it as a default.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  15. #15
    Join Date
    Jul 2008
    Posts
    80
    Added some extra security rules.

  16. #16
    Join Date
    Sep 2011
    Posts
    37
    Quote Originally Posted by rjd22 View Post
    SSH: Ok when you did everything right at DirectAdmin You shouldn't have to do more than this:
    1. Edit /etc/named.conf
    IcyTexx asked a question that's bugs me and I don't see an answer
    - because I'm in front of a task on setting my first own NS, got read many tuts an faqs, done it right like it says in DA help or here in this post @registrar & @da BUT do I have to do those named.conf changes manually?
    I do not have those directives at named.conf. Didnt's see any includes to them. So I'll have to insert them? So, like IcyTexx sad because is DA isn;t this supposed to be automatic and there is no mention editing named.conf with DA in other tutorials. So I'm confused. My impatience born this post as my nameservers are propagating at parents so I'm middle of nothing trying to work out once more that IcyTexx's question and decide if I did all right.

    [CentOS 5.5, openvz]

    Thanks you guys.

  17. #17
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    You have no bind installed, so, prolly or your directadmin instalaltion failed or you are not a directadmin user.

    This forum is just for directadmin users that help each other.

    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  18. #18
    Join Date
    Sep 2011
    Posts
    37
    Quote Originally Posted by SeLLeRoNe View Post
    your directadmin instalaltion failed or you are not a directadmin user.

    This forum is just for directadmin users that help each other.
    Regards
    . Kindly thanks for your info and your time, .. but in fact, i am a directadmin user, got lifetime internal license on my vps box, i'm using it for almost 1y with success and still learning ..
    Code:
    #rpm -qa | grep -i bind
    bind-9.3.6-16.P1.el5
    bind-libs-9.3.6-16.P1.el5
    bind-utils-9.3.6-16.P1.el5
    ..nevermind.

    I did steps "in SSH" just 4 safe, but question was - "Did I had to?"

    Code:
    acl trusted { 127.0.0.1; };                   //-added
    options {
            directory "/var/named";
            // query-source address * port 53;
    
    listen-on port 53 { 127.0.0.1; };            //-added
    listen-on port 53 { 188.116.4.48; };      //-added
    listen-on port 53 { 188.116.52.25; };    //-added
    
            //allow-transfer { none; };            //-commented
            //allow-recursion { localnets; };     //-commented
    allow-recursion { trusted; };                  //-added
    allow-transfer { trusted; };                    //-added
    allow-notify { trusted; };                       //-added
    
    ........
    and i added in etc/resolv.conf
    Code:
    nameserver 127.0.0.1
    and according to intodns.com my nameservers are working and switched smoothly.
    Thanks for this guide!

  19. #19
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Oh, bad reading.. ive read ive no named.conf xD didnt notice you was menthioning the directive sorry...

    Im working too much :/
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  20. #20
    Join Date
    Nov 2012
    Posts
    10
    i have the same problem. do i have to literally "Tell DirectAdmin that these will be the primary nameservers:"

    i dont how to Edit SHH.. can someone point me to the right direction pls

Page 1 of 2 12 LastLast

Similar Threads

  1. HOWTO: Setup Nameservers
    By loopforever in forum How-To Guides
    Replies: 26
    Last Post: 05-17-2016, 01:56 AM
  2. Is there a newbie setup guide available?
    By sammybotz in forum General Technical Discussion & Troubleshooting
    Replies: 1
    Last Post: 11-07-2010, 06:30 AM
  3. any guide for new server setup ?
    By tenny in forum Installation / System Requirements
    Replies: 8
    Last Post: 09-27-2009, 12:54 PM
  4. Guide for Beginners
    By survice in forum General Technical Discussion & Troubleshooting
    Replies: 13
    Last Post: 05-07-2009, 01:02 PM
  5. Request: HOWTO Debian installation guide
    By kawing05 in forum Installation / System Requirements
    Replies: 9
    Last Post: 11-17-2005, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •