You are not logged in.
Pages: 1
Hi, I'm trying to better understand DNS and I would like to run my own server. To start with it, I've installed bind following the Arch Wiki. Below is my configuration file (/etc/named.conf), which is almost like the default:
options {
directory "/var/named";
pid-file "/run/named/named.pid";
listen-on { 127.0.0.1; };
allow-recursion { 127.0.0.1; };
allow-transfer { none; };
allow-update { none; };
version none;
hostname none;
server-id none;
};
zone "localhost" IN {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "127.0.0.zone";
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
type master;
file "localhost.ip6.zone";
};
zone "255.in-addr.arpa" IN {
type master;
file "empty.zone";
};
zone "0.in-addr.arpa" IN {
type master;
file "empty.zone";
};
zone "." IN {
type hint;
file "root.hint";
};I also modified the file /etc/resol.conf, to follow localhost as nameserver
nameserver 127.0.0.1And the systemd file so it uses tue IPv4 option. So when I enable and start named, I see the following:
● named.service - Internet domain name server
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-03-27 23:40:59 CEST; 7min ago
Process: 19361 ExecReload=/usr/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 19646 (named)
Tasks: 11 (limit: 4915)
Memory: 20.3M
CGroup: /system.slice/named.service
└─19646 /usr/bin/named -4 -f -u named
mar 27 23:42:53 farone named[19646]: unexpected end of input resolving 'archlinux.org/AAAA/IN': 193.0.14.129#53
mar 27 23:42:53 farone named[19646]: DNS format error from 192.36.148.17#53 resolving ./NS: non-improving referral
mar 27 23:42:53 farone named[19646]: FORMERR resolving './NS/IN': 192.36.148.17#53
mar 27 23:42:53 farone named[19646]: DNS format error from 192.5.5.241#53 resolving ./NS: non-improving referral
mar 27 23:42:53 farone named[19646]: FORMERR resolving './NS/IN': 192.5.5.241#53
mar 27 23:42:53 farone named[19646]: resolver priming query complete
mar 27 23:42:53 farone named[19646]: unexpected end of input resolving 'archlinux.org/AAAA/IN': 199.7.83.42#53
mar 27 23:42:53 farone named[19646]: unexpected end of input resolving 'archlinux.org/AAAA/IN': 199.9.14.201#53
mar 27 23:42:53 farone named[19646]: unexpected end of input resolving 'archlinux.org/AAAA/IN': 192.36.148.17#53
mar 27 23:42:53 farone named[19646]: unexpected end of input resolving 'archlinux.org/AAAA/IN': 192.5.5.241#53So now its time to test if the server is working. I run dig @127.0.0.1 archlinux.org and get:
; <<>> DiG 9.12.1 <<>> @127.0.0.1 archlinux.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19727
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 77939ea871e779a0a5b2bbd65ababc7e5c64454ff9037841 (good)
;; QUESTION SECTION:
;archlinux.org. IN A
;; ANSWER SECTION:
archlinux.org. 3600 IN A 138.201.81.199
;; Query time: 7 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: mar mar 27 23:49:50 CEST 2018
;; MSG SIZE rcvd: 86I'm not an expert but it seems OK. I also succed doing ping -c3 archlinux.org, I suppose because this website is in cache somewhere.
BUT, if I ping -c3 wiki.archlinux.org it fails. Also, I can do some searches in DDG and get results, but in most of them when I click it appears the Firefox error: "Hmm. We’re having trouble finding that site".
These above errors disappear when I use nameserver 192.168.0.1 (my NAT router), so I guess there's something I'm missing when configuring my server, but cannot figure out what. Any advice? Thanks!
Last edited by Genis (2018-03-28 16:12:04)
Offline
I turned all three of my Arch Linux installs into DNS servers (two are on separate hard drives that I swap in and out of my laptop, so only one is operating at a time). My two computers (the laptop and desktop systems) now not only handle all their own DNS queries, but also the DNS queries for my entire network. It's been working great since I set it all up over a month and half ago. I used the OpenNIC wiki pages for getting everything up and running (hence they are OpenNIC DNS servers, just private ones, though I set up one to be accessible from the internet).
If you'd like any assistance, I'm sure I could dig up my notes.
Last edited by tydynrain (2018-03-28 08:47:43)
Registered Linux User: #623501 | Arch Linux Principles: Simplicity - Modernity - Pragmatism - User Centrality - Versatility => KISS
Arch Linux, the most exciting thing since Linus created Linux and married it with GNU/GPL.
Arch Linux for Life, Arch Linux Forever!
Offline
Thank you very much for your help, and for writting about OpenNIC. Didn't know about that and I find it a very interesting project. I'm looking forward to know more about it.
About the problem above, I just come to solve it. It seemed that the problem was not in the configuration, but in my ISP. It was blocking use of my home DNS server. I had to access to the NAT router and deactivate their nameserver.
Offline
Thank you very much for your help, and for writting about OpenNIC. Didn't know about that and I find it a very interesting project. I'm looking forward to know more about it.
About the problem above, I just come to solve it. It seemed that the problem was not in the configuration, but in my ISP. It was blocking use of my home DNS server. I had to access to the NAT router and deactivate their nameserver.
Yes, the OpenNIC Project is fantastic. I've used their DNS servers for years. It was only this year that I tried to set up my own. If I knew how easy it was, I would have done it years ago.
I'm glad that you figured out the issue. It took me a little while of tinkering and experimenting to get things working correctly, but once it's set up, it's basically almost maintenance-free. I put the local IP addresses for my 2 computers in the DNS fields of my router, so that they can be used by anyone on the network.
Registered Linux User: #623501 | Arch Linux Principles: Simplicity - Modernity - Pragmatism - User Centrality - Versatility => KISS
Arch Linux, the most exciting thing since Linus created Linux and married it with GNU/GPL.
Arch Linux for Life, Arch Linux Forever!
Offline
Pages: 1