I am a long-time developer of DNS conditional forwarding.
It allows us to add the ability to forward the DNS for the domain name system (DNS) to a VM as a conditional query.
Here is an example of using conditional forwarding to forward a domain name to a VMs virtual network adapter.
Note: This is an advanced technique that requires additional tuning and configuration.
The following procedure assumes that the hostname or IP address has already been configured for forwarding.
#1 Create a virtual network address in the domain named test.example.com .
This address is reserved for the test.test.com domain.
The first step is to add a hostname to the virtual network for the virtual adapter.
The hostname for the new virtual network can be the same as the host name that we defined in the previous step.
#2 Create a conditional request for the host named test, with the following parameters.
#3 The DNS server will be configured to forward all DNS queries for the given hostname.
The query should contain the following fields: queryType: Dns,hostName,IP Address,forwarder: [string]string For example, for the above example, if we want to forward queries for “test.example,dc=example,lts=TEST,dc2=example.org” to the test hostname, we could use: #4 For this example, I have created a virtual machine called test, named “test”.
I am running the following command: #5 Create a DNS name for the Virtual Network.
#6 Add a conditional “Dns: test” query to the “Test” Virtual Network Address.
#7 Create a Virtual Network name for this Virtual Network and add a DNS hostname “test” to it.
#8 Set the DNS forwarder to be the string “test:test.test”.
#9 Now, let’s configure the virtual machine to forward DNS queries to the new hostname test: #10 Set the virtual host name to test.
Now we can configure the DNS server to forward traffic to the host, as shown below: #11 To create a virtual host named “Test”, I have named it “test”, and added it to the Virtual network.
#12 Create a new DNS query and set it to use “test test” as the forwarder.
The Dns: query is a string that starts with “test:” and ends with the IP address of the new domain name.
The IP address for the “test domain name” should be the IP of the host we created in step #2 above.
#13 Create a Dns name for “TestDomainName.com” and add it to this new virtual host.
#14 Set the forwarders for “DNS: test:test.” to “test;test;tcp://localhost:5000;test” and set the Dns query to use the string “/test: test domain name”; the IP addresses for the hosts should be identical to the IPs that we used in step 3 above.
For example: #15 If you want to make a DNS query for a domain named “TEST”, you would use: //16 Now, create a DNS name for test, and add that to the Domain Name System.
#17 Set the forwarding for ” Dns .test: .test domain Name” to “TestDomainName”.
#18 Now, we can create a DNS request for ” Test “.
This request is a conditional DNS query that is sent to all of the hosts in the new “Test Domain Name”.
#19 Now, to add an alias for the alias “TestAlias”, I would create a new virtual machine named “alias test” and make a request for a specific domain name: #20 Set the alias request to “alias TestAlias;test.
Test”; the query for the DNS host “Test”.
#21 Add the host names “test alias” and “test host” to this virtual machine and set them to use this alias.
#22 Create a host named alias test and add the hostnames “test name test alias” to that hostname: #23 Now, I can configure all of my hosts in my virtual network to use my alias.
This is a very powerful and efficient way to configure virtual networks, and it can be very time-saving.
#24 To configure a virtual virtual network, we would use the following steps: #25 Create a “virtual network” in the name of the virtual IP address.
#26 Create a list of hosts on this virtual network that we want this virtual virtual host to forward to.
#27 Create a string of a host name on the virtual interface for this virtual interface that will be used as a host to connect to the hosts on the new Virtual Network: #28 Configure a virtual DNS host on the Virtual Host to forward this virtual IP Address to the DNS.
#29 Configure DNS Forwarder for the physical network that this virtual