'DNS resolves machines on network but does not resolve virtual machines
I have an issue with my internal network. I have a proxmox server with multiple VM on it; I also have other servers and NAS on the same network. I wanted to have a local domain name, so I created a LXC container which acts as a DNS server inside proxmox. I installed alpine on it and BIND DNS. I configured the DNS server as follows:
- File /var/bind/pri/internal.gpap.zone
$TTL 86400
@ IN SOA dns.internal.gpap. root.internal.gpap. (
2022040802 ; Serial
28800 ; Refresh
14400 ; Retry
604800 ; Expire - 1 week
86400 ) ; Minimum
@ IN NS dns
ns IN A 127.0.0.1
dns IN A 192.168.1.4
internal.gpap IN A 192.168.1.1
onlyoffice.internal.gpap IN A 192.168.1.118
rocketchat.internal.gpap IN A 192.168.1.150
nas.internal.gpap IN A 192.168.1.113
proxy.internal.gpap IN A 192.168.1.5
- File /etc/bind/named.conf
options {
directory "/var/bind";
allow-recursion {
127.0.0.1/32; 192.168.1.0/24;
};
forwarders {
8.8.8.8;
8.8.4.4;
1.1.1.1;
};
listen-on { 127.0.0.1; 192.168.1.0/24; };
listen-on-v6 { none; };
pid-file "/var/run/named/named.pid";
allow-transfer { none; };
dnssec-validation auto;
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
zone "internal.gpap" IN {
type master;
file "internal.gpap.zone";
};
The DNS server is running and it correclty resolves nas.internal.gpap or onlyoffice.internal.gpap. These two are individual machines on the network. However when I try to resolve other LXC containers/Linux VM on the same proxmox server (for example rocketchat.internal.gpap) it does not work. Some other notes:
I can correctly ping all the servers (physical and virtual) and I can access all the LXC containers/Linux VM through their IP address.
Nslookup shows:
*** UnKnown can't find rocketchat.internal.gpap: Non-existent domainThe VM are connected to internet through a linux bridge inside proxmox.
It is really strange that the DNS resolves physical machines but does not resolve VM on the same server. Can someone help? Thank you so much!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
