Set up bind9 for home server





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I want to build a server at home and in order to serve subdomains I have to offer a DNS service. After several attempts and having followed many tutorials, I still have not been able to accomplish it. This is my configuration:




  • LAN is 192.168.178.0/24

  • server's hostname is zotac and it's IP is 192.168.178.10

  • The domain's name should be spiti

  • The subdomains should be reached by typing financer.spiti, fotos.spiti, wiki.spiti and so on in the browser from any device in the LAN


  • bind9 is installed and running on zotac


  • named-checkconf /etc/bind/named.conf throws no errors




Configuration files:



/etc/bind/named.conf.local




zone "spiti" {
type master;
file "/etc/bind/db.spiti";
};

zone "178.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.178.168.192";
};


/etc/bind/named.conf.options




options {
directory "/var/cache/bind";
forwarders {
1.1.1.1;
1.0.0.1;
};
dnssec-validation auto;

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};


Zone "spiti":/etc/bind/db.spiti




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
@ IN A 192.168.178.10

ns IN A 192.168.178.10
localhost IN A 127.0.0.1
zotac CNAME A ns
spiti CNAME A ns


Reverse lookup:/etc/bind/db.178.168.192




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
10 IN PTR financer.spiti.
10 IN PTR fotopoulos.spiti.
10 IN PTR spiti.






  • curl zotac returns the index.html content under the apache home folder: ok.


  • curl spiti returns Could not resolve host: spiti : not ok

  • When I configure my modem-router to use my server as DNS server, no device has connection to internet.


What am I doing wrong?





@grawity , thanks for the tool, I did not know it. Unfortunately, I have no other ubuntu machine in the LAN, but if I do it from zotac, I get following:



dig zotac. @192.168.178.10





; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> zotac. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21239
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 3dbe6e33d4fd4f8919a248005c61bb9c52a74f69dd33aeb4 (good)
;; QUESTION SECTION:
;zotac. IN A
;; AUTHORITY SECTION:
. 3509 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2019021101 1800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:14:52 CET 2019
;; MSG SIZE rcvd: 137


dig spiti. @192.168.178.10






; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> spiti. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 35818
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 33c2f859bcd0fa769901e53a5c61bb35a046cc36e6bea06b (good)
;; QUESTION SECTION:
;spiti. IN A
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:13:09 CET 2019
;; MSG SIZE rcvd: 62










share|improve this question

























  • dnsmasq is so much simpler, FYI.

    – multithr3at3d
    Feb 10 at 22:11











  • Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

    – grawity
    Feb 10 at 22:14











  • @elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

    – grawity
    Feb 10 at 22:15













  • @grawity Thanks for the info, I updated the post with the output of dig

    – elserra
    Feb 11 at 11:58


















0















I want to build a server at home and in order to serve subdomains I have to offer a DNS service. After several attempts and having followed many tutorials, I still have not been able to accomplish it. This is my configuration:




  • LAN is 192.168.178.0/24

  • server's hostname is zotac and it's IP is 192.168.178.10

  • The domain's name should be spiti

  • The subdomains should be reached by typing financer.spiti, fotos.spiti, wiki.spiti and so on in the browser from any device in the LAN


  • bind9 is installed and running on zotac


  • named-checkconf /etc/bind/named.conf throws no errors




Configuration files:



/etc/bind/named.conf.local




zone "spiti" {
type master;
file "/etc/bind/db.spiti";
};

zone "178.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.178.168.192";
};


/etc/bind/named.conf.options




options {
directory "/var/cache/bind";
forwarders {
1.1.1.1;
1.0.0.1;
};
dnssec-validation auto;

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};


Zone "spiti":/etc/bind/db.spiti




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
@ IN A 192.168.178.10

ns IN A 192.168.178.10
localhost IN A 127.0.0.1
zotac CNAME A ns
spiti CNAME A ns


Reverse lookup:/etc/bind/db.178.168.192




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
10 IN PTR financer.spiti.
10 IN PTR fotopoulos.spiti.
10 IN PTR spiti.






  • curl zotac returns the index.html content under the apache home folder: ok.


  • curl spiti returns Could not resolve host: spiti : not ok

  • When I configure my modem-router to use my server as DNS server, no device has connection to internet.


What am I doing wrong?





@grawity , thanks for the tool, I did not know it. Unfortunately, I have no other ubuntu machine in the LAN, but if I do it from zotac, I get following:



dig zotac. @192.168.178.10





; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> zotac. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21239
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 3dbe6e33d4fd4f8919a248005c61bb9c52a74f69dd33aeb4 (good)
;; QUESTION SECTION:
;zotac. IN A
;; AUTHORITY SECTION:
. 3509 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2019021101 1800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:14:52 CET 2019
;; MSG SIZE rcvd: 137


dig spiti. @192.168.178.10






; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> spiti. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 35818
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 33c2f859bcd0fa769901e53a5c61bb35a046cc36e6bea06b (good)
;; QUESTION SECTION:
;spiti. IN A
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:13:09 CET 2019
;; MSG SIZE rcvd: 62










share|improve this question

























  • dnsmasq is so much simpler, FYI.

    – multithr3at3d
    Feb 10 at 22:11











  • Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

    – grawity
    Feb 10 at 22:14











  • @elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

    – grawity
    Feb 10 at 22:15













  • @grawity Thanks for the info, I updated the post with the output of dig

    – elserra
    Feb 11 at 11:58














0












0








0








I want to build a server at home and in order to serve subdomains I have to offer a DNS service. After several attempts and having followed many tutorials, I still have not been able to accomplish it. This is my configuration:




  • LAN is 192.168.178.0/24

  • server's hostname is zotac and it's IP is 192.168.178.10

  • The domain's name should be spiti

  • The subdomains should be reached by typing financer.spiti, fotos.spiti, wiki.spiti and so on in the browser from any device in the LAN


  • bind9 is installed and running on zotac


  • named-checkconf /etc/bind/named.conf throws no errors




Configuration files:



/etc/bind/named.conf.local




zone "spiti" {
type master;
file "/etc/bind/db.spiti";
};

zone "178.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.178.168.192";
};


/etc/bind/named.conf.options




options {
directory "/var/cache/bind";
forwarders {
1.1.1.1;
1.0.0.1;
};
dnssec-validation auto;

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};


Zone "spiti":/etc/bind/db.spiti




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
@ IN A 192.168.178.10

ns IN A 192.168.178.10
localhost IN A 127.0.0.1
zotac CNAME A ns
spiti CNAME A ns


Reverse lookup:/etc/bind/db.178.168.192




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
10 IN PTR financer.spiti.
10 IN PTR fotopoulos.spiti.
10 IN PTR spiti.






  • curl zotac returns the index.html content under the apache home folder: ok.


  • curl spiti returns Could not resolve host: spiti : not ok

  • When I configure my modem-router to use my server as DNS server, no device has connection to internet.


What am I doing wrong?





@grawity , thanks for the tool, I did not know it. Unfortunately, I have no other ubuntu machine in the LAN, but if I do it from zotac, I get following:



dig zotac. @192.168.178.10





; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> zotac. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21239
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 3dbe6e33d4fd4f8919a248005c61bb9c52a74f69dd33aeb4 (good)
;; QUESTION SECTION:
;zotac. IN A
;; AUTHORITY SECTION:
. 3509 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2019021101 1800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:14:52 CET 2019
;; MSG SIZE rcvd: 137


dig spiti. @192.168.178.10






; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> spiti. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 35818
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 33c2f859bcd0fa769901e53a5c61bb35a046cc36e6bea06b (good)
;; QUESTION SECTION:
;spiti. IN A
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:13:09 CET 2019
;; MSG SIZE rcvd: 62










share|improve this question
















I want to build a server at home and in order to serve subdomains I have to offer a DNS service. After several attempts and having followed many tutorials, I still have not been able to accomplish it. This is my configuration:




  • LAN is 192.168.178.0/24

  • server's hostname is zotac and it's IP is 192.168.178.10

  • The domain's name should be spiti

  • The subdomains should be reached by typing financer.spiti, fotos.spiti, wiki.spiti and so on in the browser from any device in the LAN


  • bind9 is installed and running on zotac


  • named-checkconf /etc/bind/named.conf throws no errors




Configuration files:



/etc/bind/named.conf.local




zone "spiti" {
type master;
file "/etc/bind/db.spiti";
};

zone "178.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.178.168.192";
};


/etc/bind/named.conf.options




options {
directory "/var/cache/bind";
forwarders {
1.1.1.1;
1.0.0.1;
};
dnssec-validation auto;

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};


Zone "spiti":/etc/bind/db.spiti




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
@ IN A 192.168.178.10

ns IN A 192.168.178.10
localhost IN A 127.0.0.1
zotac CNAME A ns
spiti CNAME A ns


Reverse lookup:/etc/bind/db.178.168.192




$TTL 604800
@ IN SOA ns.spiti. root.localhost. (
2015121701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.spiti.
10 IN PTR financer.spiti.
10 IN PTR fotopoulos.spiti.
10 IN PTR spiti.






  • curl zotac returns the index.html content under the apache home folder: ok.


  • curl spiti returns Could not resolve host: spiti : not ok

  • When I configure my modem-router to use my server as DNS server, no device has connection to internet.


What am I doing wrong?





@grawity , thanks for the tool, I did not know it. Unfortunately, I have no other ubuntu machine in the LAN, but if I do it from zotac, I get following:



dig zotac. @192.168.178.10





; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> zotac. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21239
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 3dbe6e33d4fd4f8919a248005c61bb9c52a74f69dd33aeb4 (good)
;; QUESTION SECTION:
;zotac. IN A
;; AUTHORITY SECTION:
. 3509 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2019021101 1800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:14:52 CET 2019
;; MSG SIZE rcvd: 137


dig spiti. @192.168.178.10






; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> spiti. @192.168.178.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 35818
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 33c2f859bcd0fa769901e53a5c61bb35a046cc36e6bea06b (good)
;; QUESTION SECTION:
;spiti. IN A
;; Query time: 0 msec
;; SERVER: 192.168.178.10#53(192.168.178.10)
;; WHEN: Mon Feb 11 19:13:09 CET 2019
;; MSG SIZE rcvd: 62







dns apache-http-server lan bind ubuntu-18.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 11 at 18:16







elserra

















asked Feb 10 at 16:05









elserraelserra

2614




2614













  • dnsmasq is so much simpler, FYI.

    – multithr3at3d
    Feb 10 at 22:11











  • Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

    – grawity
    Feb 10 at 22:14











  • @elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

    – grawity
    Feb 10 at 22:15













  • @grawity Thanks for the info, I updated the post with the output of dig

    – elserra
    Feb 11 at 11:58



















  • dnsmasq is so much simpler, FYI.

    – multithr3at3d
    Feb 10 at 22:11











  • Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

    – grawity
    Feb 10 at 22:14











  • @elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

    – grawity
    Feb 10 at 22:15













  • @grawity Thanks for the info, I updated the post with the output of dig

    – elserra
    Feb 11 at 11:58

















dnsmasq is so much simpler, FYI.

– multithr3at3d
Feb 10 at 22:11





dnsmasq is so much simpler, FYI.

– multithr3at3d
Feb 10 at 22:11













Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

– grawity
Feb 10 at 22:14





Except in how it invents its own zone syntax instead of using the standard format, and tries to be a DHCP & TFTP & SLAAC server at the same time as a DNS server, and in this particular case probably isn't where the problem lies anyway...

– grawity
Feb 10 at 22:14













@elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

– grawity
Feb 10 at 22:15







@elserra: What results do you get from dig zotac.spiti. @192.168.178.10, dig spiti.spiti. @192.168.178.10, and dig spiti. @192.168.178.10 from another machine?

– grawity
Feb 10 at 22:15















@grawity Thanks for the info, I updated the post with the output of dig

– elserra
Feb 11 at 11:58





@grawity Thanks for the info, I updated the post with the output of dig

– elserra
Feb 11 at 11:58










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404171%2fset-up-bind9-for-home-server%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404171%2fset-up-bind9-for-home-server%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Список кардиналов, возведённых папой римским Каликстом III

Deduzione

Mysql.sock missing - “Can't connect to local MySQL server through socket”