New install 3.1.6 DNS not working

Discussion in 'Installation/Configuration' started by brisk, Sep 3, 2017.

  1. brisk

    brisk Member

    Hi, I followed this instruction https://www.howtoforge.com/tutorial...-9-stretch-apache-bind-dovecot-ispconfig-3-1/ to installed the 3.1 on my Debian 9.1 KVM, and then upgraded to 3.1.6.

    Then I followed this tutorial (I did part 2 first) but my DNS is not working.

    So basically I changed my windows machine's DNS server to point to my newly created all in one ISPConfig server, and the dns still resolves to the old address. I searched high and low and I don't see a bind9 zone file is created anywhere on my server and I don't see any errors anywhere. And ISPConfig.log is empty. dig @localhost mydomain.com resolves with my old record from my old dns.

    Anything to check?

    thanks
     
  2. brisk

    brisk Member

    I saw a .err file was generated in /etc/bind folder.

    What does that mean? the domain is currently registered at godaddy and I didn't touch name server specified at godaddy, it points to my current host provider: ns1.otherhost.com, and ns2.otherhost.com

    thanks
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The .err file means that BINF rejected the zone file that you created and therefore it was not activated. Post the content of the .err file.
     
  4. brisk

    brisk Member

    Thanks. Here you go:
    (I replaced domain and IP with dummy ones)

    Currently, I am using WHM/Cpanel on another host provider for all my sites. And I have a DNS server there, so I have instructed Godaddy that all my websites' DNS server is the one I have e.g. ns2.mycompany.com, and ns1.mycompany.com, so ideally I want to do the same thing with ISPConfig, for example, mydomain.com and myotherdomain.com's DNS is ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com. Is this doable?

    Code:
    root@server1:/etc/bind# cat pri.mydomain.com.err
    $TTL        3600
    @       IN      SOA     ns1.mydomain.com. support.mydomain.com. (
                            2017090201       ; serial, todays date + todays serial #
                            7200              ; refresh, seconds
                            540              ; retry, seconds
                            604800              ; expire, seconds
                            3600 )            ; minimum, seconds
    ;
    
    mydomain.com. 3600      TXT        "v=spf1 mx a ~all"
    mydomain.com. 3600      MX    10   mail.mydomain.com.
    mydomain.com. 3600      NS        ns2.mydomain.com.
    mydomain.com. 3600      NS        ns1.mydomain.com.
    mail 3600 A        111.222.333.444
    www 3600 A        111.222.333.444
    mydomain.com. 3600 A        111.222.333.444
    
    
     
    Last edited: Sep 3, 2017
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You missed adding A-Records for ns1 and ns2. When the NS records of a domain are subdomains of the same domain, then these must exist as A-Records as well.
     
  6. brisk

    brisk Member

    Where do I do that in the ISPConfig? I did this using the wizard and didn't do it manually.
     
  7. brisk

    brisk Member

    Currently, I am using WHM/Cpanel on another host provider for all my sites. And I have a DNS server there, so I have instructed Godaddy that all my websites' DNS server is the one I have e.g. ns2.mycompany.com, and ns1.mycompany.com, so ideally I want to do the same thing with ISPConfig, for example, mydomain.com and myotherdomain.com's DNS is ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com. Is this doable?

    I guess I need to go to godaddy, add a glue record point ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com to the IP of my all in one server, and in the ISPConfig wizard, instead of using subdomians, I just use ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com and is should work?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Login to ispconfig, go to the dns zone and there click on the records tab. On the records tab, add two A-Records, one for ns1 and one for ns2.
     
  9. brisk

    brisk Member

    Oh, actually I don't need to go do go daddy to do that...
    Use the wizard to create a zone file for mynewserverusingispconfig.com, then manually add two A records for ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com, then when I create my other sites's zone files, I just specify ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com as the name servers? Then change godaddy for all my sites to (including mynewserverusingispconfig.com) to use ns1.mynewserverusingispconfig.com and ns2.mynewserverusingispconfig.com as name servers?
     
  10. brisk

    brisk Member

    Still .err file.
    Code:
    root@server1:/etc/bind# more pri.mydomain.com.err
    $TTL        3600
    @       IN      SOA     ns1.mydomain.com. support.mydomain.com. (
                            2017090302       ; serial, todays date + todays serial #
                            7200              ; refresh, seconds
                            540              ; retry, seconds
                            604800              ; expire, seconds
                            3600 )            ; minimum, seconds
    ;
    
    mydomain.com. 3600      TXT        "v=spf1 mx a ~all"
    mydomain.com. 3600      MX    10   mail.mydomain.com.
    mydomain.com. 3600      NS        ns2.mydomain.com.
    mydomain.com. 3600      NS        ns1.mydomain.com.
    mail 3600 A        111.222.333.444
    www 3600 A        111.222.333.444
    mydomain.com. 3600 A        111.222.333.444
    ns1.mydomain.com 3600 A        111.222.333.444
    ns2.mydomain.com 3600 A        111.222.333.444
    
    
     
  11. brisk

    brisk Member

    Seems working!

    A record hostname should be ns1 and ns2, not ns1.mydomain.com and ns2.mydomain.com?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I asked you to add ns1 and ns2 as records. You added 'ns1.mydomain.com' and 'ns2.mydomain.com'. A few basics about DNS (not ISPConfig specific): When you add a fqdn like
    'ns2.mydomain.com' then it has to end with a dot, see the other records in the zone. When you add a subdomain that is not a fqdn like 'ns1' or 'www', then it does not end with a dot.

    So what you created above is the A-Record "ns1.mydomain.com.mydomain.com" and not "ns1.mydomain.com".
     
  13. brisk

    brisk Member

    Thank you soooooo much!

    So the dig @localhost www.mydomain.com on my server echoes the correct information now :)
    But one my windows it still shows old ip, so wait game? (but I already changed my windows' wireless IPv4 property to use my server's IP address as the IP address of the DNS server, exactly same as what I saw in the Youtube tutorial, here is the output:

    Code:
    C:\Users\nonroot>nslookup www.mydomain.com
    Server:  UnKnown
    Address:  2001:18c0:ffe0:3::2
    
    Non-authoritative answer:
    Name:    mydomain.com
    Address:  444.333.222.111
    Aliases:  www.mydomain.com
    
    
    C:\Users\nonroot>nslookup www.mydomain.com 111.222.333.444
    Server:  UnKnown
    Address:  111.222.333.444
    
    Name:    www.mydomain.com
    Address:  111.222.333.444
    
    
    C:\Users\nonroot>ping www.mydomain.com
    
    Pinging mydomain.com [444.333.222.111] with 32 bytes of data:
    Reply from 444.333.222.111: bytes=32 time=30ms TTL=52
    Reply from 444.333.222.111: bytes=32 time=30ms TTL=52
    Reply from 444.333.222.111: bytes=32 time=28ms TTL=52
    Reply from 444.333.222.111: bytes=32 time=29ms TTL=52
    
    Ping statistics for 444.333.222.111:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 28ms, Maximum = 30ms, Average = 29ms
    
    C:\Users\nonroot>
     
  14. brisk

    brisk Member

    So I found in the wireless adapter properties, IPv6 is enabled, so I disabled IPv6, nsloopup shows the new IP now (without specifying the dns server), but ping still shows old ip. Also if I disable IPv6, this site is not accessible, (www.howtoforge.com), browser flicks... and I had to enable Ipv6 again in order to post.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Wait a day until the dns caches got the new record. And you can use a tool like intodns.com to test the dns setup upfront. It might be nescessary that you add glue records at godaddy in case that intodns can't find your dns server.
     
  16. brisk

    brisk Member

    Thank you!
     

Share This Page