1

I am attempting to setup a bind DNS server for use with a domain I recently registered using No-IP. I registered my DNS server with No-IP using ns1.mydomain.net and ns2.mydomain.net pointing to the exact same IP because I only have one IP to point it to. Then in my db.mydomain.net.txt zone file I put this

$TTL 6h
$ORIGIN mydomain.net.
@   IN SOA  ns1.mydomain.net.   hostmaster.mydomain.net. (
        2014062101
        10800
        3600
        604800
        86400 )

@   IN SOA  ns2.mydomain.net.   hostmaster.mydomain.net. (
        2014062102
        10800
        3600
        604800
        86400 )         
IN  NS  ns1.mydomain.net.
IN  NS  ns2.mydomain.net.
ns1 IN  A   1.2.3.4
ns2 IN  A   1.2.3.4
@   IN  A       1.2.3.4
scoopta   IN  A 1.2.3.4
files     IN  A     1.2.3.4

My goal is to setup two subdomains not including ns1 and ns2. Those being scoopta.mydomain.net and files.mydomain.net. However it doesn't work and whenever I do

nslookup mydomain.net

I get a SERVERROR and it doesn't work. I've never used bind before so I honestly have no clue what I'm doing. Thanks. As a disclaimer I do have port 53 TCP and UDP open on my router and I have used http://canyouseeme.org to check if the server is accessible and it is. It's something with my configuration I'm sure.

1 Answers1

1

You can only have one SOA record in a zone file. Remove the second SOA record.

$TTL 6h
$ORIGIN mydomain.net.
@   IN SOA  ns1.mydomain.net.   hostmaster.mydomain.net. (
        2014062101
        10800
        3600
        604800
        86400 )        
IN  NS  ns1.mydomain.net.
IN  NS  ns2.mydomain.net.
ns1 IN  A   1.2.3.4
ns2 IN  A   1.2.3.4
@   IN  A       1.2.3.4
scoopta   IN  A 1.2.3.4
files     IN  A     1.2.3.4
Cakemox
  • 25,209
  • 6
  • 44
  • 67
  • If I only have one SOA then it just fails 100%...I got it kinda sorta working by adding the second –  Jun 22 '14 at 21:53
  • Part of the problem is No-IP requires two servers but I only have one so I'm not sure how to go about having both ns1 and ns2 configured on the same server. That's why I did the double SOA records –  Jun 22 '14 at 22:02
  • THANK YOU!!!...I setup a second zone for ns2 and now that I have two zones with one SOA each the server is working perfectly –  Jun 23 '14 at 03:20
  • Turns out that having the second zone caused ns2.mydomain.net to not be found. I got rid of it and now ns2.mydomain.net returns my IP I just don't know whether or not a DNS request can be made to it. Any light on the subject? –  Jun 23 '14 at 03:30
  • You should only need one zone. You can try using dig to check that both are working: `dig @ns2.mydomain.net mydomain.net a` – Cakemox Jun 23 '14 at 08:19
  • Yes both are working. Thank you for the assistance. Like I said I deleted the second zone file because it was actually causing issues. The server is working fine. –  Jun 23 '14 at 09:37