0

In Ubuntu I'm trying to configure a DNS-server for a domain. I haven't tested it yet because I haven't got access to the virtual box yet. But I can feel that it contains problems. Can someone spot any obvious errors? I know it's hard without running a server test.

I have configured named.conf.local like this:

zone "craig.linuxcourse.tfe.ltu.se" { type master; file "/etc/bind/db.craig.linuxcourse.tfe.ltu.se"; }; 

Now I'm trying to configure the zone file but I'm sort of confused what to change the localhost to for it to be able to connect.

I also want to add the following hosts:

  • ns1 (with a NS- and a A-record for the DNS-server)

  • www

  • ftp

  • 'student name' (this should be the name for the virtual server)

This is what I have changed so far:

; ; BIND data file for example.com ; $TTL 604800 @ IN SOA craig.linuxcourse.tfe.ltu.se. root.linuxcourse.tfe.ltu.se. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL IN A 192.168.1.10 ; @ IN NS ns1.craig.linuxcourse.tfe.ltu.se. @ IN A craig.linuxcourse.tfe.ltu.se www IN A www.craig.linuxcourse.tfe.ltu.se ftp IN A ftp.craig.linuxcourse.tfe.ltu.se 
2
  • A records need an IP address, not another name. So you can't do @ IN A craig.example.com. but you can do @ IN A 10.10.10.10. Commented May 21, 2018 at 13:57
  • You have all sorts of issues. named-checkzone example.com /path/to/zonefile will check zone file syntax and tell you what is wrong. Or be lazy and use a zone file generator like zonefile.org Commented May 21, 2018 at 16:20

2 Answers 2

0

Like the other person said A records require addresses. But you can use CNAMEs like I think you are trying in your example .

wwww IN A 192.168.1.10 ftp IN CNAME wwww 
0

Thanks for all the answers. I have edited the configs after reading your comments. Does this look more OK?

; BIND data file for local loopback interface ; $TTL 5D @ IN SOA ns1.craig.linuxcourse.tfe.ltu.se. root.linuxcourse.tfe.ltu.se. ( 2018052100 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 10800 ); Negative Cache TTL ; IN NS ns1.craig.linuxcourse.tfe.ltu.se. ns1 IN A xxx.239.163.100 www IN A xxx.239.163.110 ftp IN A xxx.239.163.120 craig IN A xxx.239.163.130 

And this is what the named.conf.local looks like:

zone "craig.linuxcourse.tfe.ltu.se" in { allow-transfers { any; }; file "/etc/bind/db.craig.linuxcourse.tfe.ltu.se"; type master; }; 
1
  • the line starting with ns1 should be ns1 IN A and not NS; we also nowadays use as somewhat de facto standard a Serial of YYMMDDnn as in 2018052100 for the first edit of the day. The max value allowed for the negative cache in SOA is 10800 Commented May 21, 2018 at 20:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.