1

I have the following setup:

box one:

  • RHEL 7.3
  • NetworkManager pointing dns to /etc/resolv.conf
  • /etc/resolv.conf pointing at the external IP of itself
  • dnsmasq (configured by someone else) listening on that IP for dns requests
  • dnsmasq having a /etc/dnsmasq.d/something file that points to two external, corp dns servers

box two: being an exact copy of box one, besides pointing to its own IP instead of box one's.

Now I want to host my own TLD "master" on box one in a way that a program on box two is able to create a veth network and assign hostname "vhost1.master", "vhost2.master", "vhost3.master", in such a way that preferably even a box three could be setup with box one as nameserver and be able to reach a webserver at "vhost1.master".

It seems from what I've read that I should just be able to achieve that by adding to box.one:/etc/resolv.conf an entry " master" and everything should work. But it doesn't. What am I missing?

Sorry really new to all this dns self configuration. Some keywords for googling would probably already be enough help for now.

erikbstack
  • 139
  • 2
  • 9
  • 1
    Try reading the man page for DNSMasq http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html. It may get you started on the correct answer. – BillThor Jul 27 '17 at 02:41
  • Thanks, however man pages only help you when you already know how to translate your human goals to computer readable goals. In this case I don't know what DNS or DHCP entries I like to create, so a man page can't tell me. Still, my thanks are honest. It's the first time someone besides myself answers a getting started question. – erikbstack Jul 27 '17 at 08:20
  • "Now I want to host my own TLD "master"" Do not do that, except for temporary local experiments. For everything else, either use RFC2606 sanctioned TLDs such as `.test` or `.example` or else register a domain name in any TLD (by going through a registrar and paying for it) and then use this name as suffix of all your names. – Patrick Mevzek Feb 16 '20 at 07:14

1 Answers1

0

configuration

As a starting point it's always good to read some basics about what DNS actually is.

Next there is a tutorial using dnsmasq for a local domain and as dhcp server.

Further details can be found in the archwiki article about dnsmasq. Noteworthy mention goes to MaraDNS because their docs are in my eyes also helpful to understand the different types of DNS servers (e.g. authorative vs recursive) as well as the importance of zone files.

However MaraDNS doesn't use standardized zone files, therefore the wiki article about zone files shouldn't be forgotten as well.

Finally @BillThor was so nice to provide a link to dnsmasq's man page, which from my investigation seems to be the easiest solution for local needs at least.


debugging

A major tool to debug and analyse dns requests is dig. My colleague however prefers host <target> <nameserver-to-ask>.

Also I found it quite helpful to set the -q flag for the dnsmasq service in the dnsmasq.service file mentioned when you call systemctl status dnsmasq (for me it's /usr/lib/systemd/system/dnsmasq.service). By that one can see who made requests for what.

erikbstack
  • 139
  • 2
  • 9
  • Just linking to external articles is frowned upon on the StackExchange network. You can link to external articles for reference, but your answer should contain the complete answer, otherwise it becomes useless when the links go dead. – Gerald Schneider Jul 27 '17 at 11:40
  • Thanks for the info. I'm working on that part. As you might see I'm also the question asker and since nobody answers I have to figure it out myself. When I have more info I'll add it. – erikbstack Jul 27 '17 at 12:17