0

My end goal is to setup a DNS server to use in the network 10.0.0.0/24, the network consists of a TP-Link home switch and a workstation running runtu(ubuntu)linux and a laptop connect to that switch, the DNS server should be used to resolve ip address in the network 10.0.0.0/24 only

the server 10.0.0.1 runs ssh,dhcp and hopefully dns

I installed bind9 and created the following setup

/etc/bind/named

OPTIONS="-4 -u bind"

/etc/bind/named.conf.local

zone "workstation.local" {
    type master;
    file "/etc/bind/forward.workstation.local";
};

zone "10.0.0.in-addr.arpa" {
    type master;
    file "/etc/bind/reverse.workstation.local"; # 10.0.0.0/24
};

/etc/bind/forward.workstation.local

$TTL    604800
@   IN  SOA localhost. root.localhost. (
                  1     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  ns1.workstation.localhost.
@   IN  A   10.0.0.1

/etc/bind/reverse.workstation.local

$TTL    604800
@   IN  SOA localhost. root.localhost. (
                  1     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  ns1.workstation.local.
1   IN  PTR ns1.workstation.local.

when trying the command host workstation.local I get the output Host workstation.local not found: 2(SERVFAIL)

How to properly setup the dns server so that the laptop can connect to the ip 10.0.0.1 using the workstation.local This is my first time setting up a dns server in linux, I could use all the help possible

Update I tried to use home instead of local but I still can't reach the server from the laptop

sampi
  • 533
  • 4
  • 14
misfit
  • 1
  • 1
  • see this https://unix.stackexchange.com/questions/457166/can-not-resolve-local-domains-internal-to-my-office-lan/457525#457525 – Rui F Ribeiro Mar 17 '23 at 18:25
  • Though technically you might be able to pull it off, I've never seen subdomains on .local. It is supposed to be a top level domain valid only for the local link. And it should work without configuration if you use avahi-mdns for example. Trying to set that up might run into problems, for example resolution in Linux might go to mdns_minimal first (in `/etc/resolv.conf`) instead of your server. – Eduardo Trápani Mar 17 '23 at 18:25
  • @EduardoTrápani I changed `local` to `home` but i still can't reach the server – misfit Mar 17 '23 at 18:42
  • I fear this question might be a bit too big to get a proper answer. Setting up and configuring any server is a process with many steps... My best hint though is to use [wireshark](https://www.wireshark.org/) a lot. Once you collect and analyze pcaps, you know what's really happening. – sampi Mar 24 '23 at 17:52

0 Answers0