Join the community today
Become a Member

DNS Trying to setup DNS on Local NSD

Discussion in 'Domains, DNS, Email & SSL Certificates' started by amit, Oct 3, 2014.

Tags:
  1. amit

    amit New Member

    3
    0
    1
    Sep 26, 2014
    Ratings:
    +0
    Local Time:
    6:01 AM
    1.7.5
    MariaDB 5.5
    Hello Everyone,
    I am learning new things everyday. I am a complete newbie and my experience with unmanaged server is very limited.
    So, please be soft and have patience with me :)

    I am trying to follow this guide for setting up local NSD but i am feeling lost with step 3.
    Here is the guide : Domains - Domain name DNS setup on local NSD server | Centmin Mod Community

    In step 3, I am suppose to add DNS entry via centmin.sh menu for A record, NS1 and NS2. Now i am really confused what IP should I add..

    In my VPS control panel, i have one main IP and four other IPs. Can i just put any IPs in there?

    Previously when I followed the guide, i just gave main ip for A record, ns1 and ns2 and it worked without any problem.

    However, when I tried to put different IPs for A, ns1 and ns2, it didn't work.I was getting problem with nameservers when i checked with intoDNS.com

    How can i setup A, ns1 and ns2 with different ips on same VPS? (If that is possible)

    Thank you for having patience with me.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,194
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    10:31 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yes add via centmin.sh in step 3, the example code shows what prompted questions you get and you need to fill them in.

    If you use different IP addresses for ns1 and ns2, there's an extra step which I should of mentioned, editing /etc/nsd/nsd.conf to list the 2 ips in ip-address fields. You need to edit and uncomment (remove front hash #) from the ip-address: lines seen below.

    So it goes from
    Code:
            # for ns1 ip on this server
            #ip-address: xxx.xxx.xxx.xxx
            # for ns2 ip on this server
            #ip-address: yyy.yyy.yyy.yyy
    to
    Code:
            # for ns1 ip on this server
            ip-address: xxx.xxx.xxx.xxx
            # for ns2 ip on this server
            ip-address: yyy.yyy.yyy.yyy
    If you have both ns1 and ns2 IP addresses on same server, you need to ensure both IP addresses have been added to your server and should be seen in the inet field output for command. If ns2 IP address is on a separate NSD based server, you DO NOT need to have the ns2 IP address added to same server. Nothing to do if ns2 IP address is on separate NSD based server other than do steps 1 to 3 listed above again, on the 2nd ns2 IP address's server.
    Code:
    ifconfig -a | grep inet
    After editing /etc/nsd/nsd.conf, restart nsd service

    Code:
    service nsd restart
    Code:
    #
    # nsd.conf -- the NSD(8) configuration file, nsd.conf(5).
    #
    # Copyright (c) 2001-2006, NLnet Labs. All rights reserved.
    #
    # See LICENSE for the license.
    #
    
    server:
            # for ns1 ip on this server
            #ip-address: xxx.xxx.xxx.xxx
            # for ns2 ip on this server
            #ip-address: yyy.yyy.yyy.yyy
    
            hide-version: yes
    
            # Maximum number of concurrent TCP connections per server.
            # This option should have a value below 1000.
            tcp-count: 100
    
            # Maximum number of queries served on a single TCP connection.
            # By default 0, which means no maximum.
            tcp-query-count: 0
    
            # Override the default (120 seconds) TCP timeout.
            tcp-timeout: 60
    
            # zonefile: to store pid for nsd in.
            pidfile: "/var/run/nsd/nsd.pid"
    
            # The directory for zonefile: files.
            zonesdir: "/etc/nsd"
    
    zone:
            name: "demo.com"
            zonefile: "master/demo.com.zone"
    
     
    Last edited: Oct 4, 2014
    • Like Like x 1
  3. amit

    amit New Member

    3
    0
    1
    Sep 26, 2014
    Ratings:
    +0
    Local Time:
    6:01 AM
    1.7.5
    MariaDB 5.5