I have several apps as a docker in VM for testing. Instead of putting on each on a different port, I would like to use a reverse proxy and call the apps by a subdomain of the domain for the VM.
In DNS on the NAT Network it says, I simply add a DNS server to the NAT.
So my question, if I run a DNS server in that VM I could reach a dockerize app by e.g. app1.myVMdomain.vmlocal , if the DNS server and reverse-proxy are configured properly?
I’m used to the fact, that a DNS resolution query goes via the DNS setting in the NIC.
I don’t want to modify the settings of the NIC as I open the VM on different Windows machines.
According to How networks work: what is a switch, router, DNS, DHCP, NAT, VPN and a dozen of other useful things | articles about programming on mkdev, there are virtual switches/NICs for the VM. In my case there are
- VMware Virtual Ethernet Adapter for VMnet1
- VMware Virtual Ethernet Adapter for VMnet8
Would DNS resolution inquiries run through this adapters as well, so that the DNS server in my VM is asked for e.g. app1.myVMdomain.vmlocal?
I find only https://kb.vmware.com/s/article/2006955 and VMware Knowledge Base what comes close but not exactly the same I’m looking for.
Reading through https://superuser.com/questions/1388845/why-is-a-local-vm-not-resolving-via-dns-and-nslookup-in-the-way-i-am-thinking-it… it looks like that I have to modify resolv.conf / NIC settings but the VM’IP is assigned by DHCP, so that is quite tricky.