VI. Feature Setup
ExpiredHow to forward DNS to a specific server - Conditional DNS Forwarding
DrayTek routers that support LAN DNS, from firmware version 3.7.8 onwards are able to forward DNS lookups for specific suffixes to a specified DNS server. This allows specified DNS suffixes, for instance a Windows domain, to use the domain controller / DNS server for local DNS lookups or DNS across a VPN without changing the DNS settings on computers directly.
The DNS requests are managed by the router's DNS proxy which allows the DNS forwarding to work regardless of which DNS server is configured on client machines, when the router is used as the gateway.
The Conditional DNS Forwarding feature allows normal DNS lookups to go through whichever server they would normally use, while the specified suffix goes through the DNS server specified on the router, so that any DNS lookups with that suffix use the correct server:
In this example, there are two DrayTek Vigor 2860 routers connected to each other using a LAN to LAN VPN connection. PCs connected to the local router need to be able to resolve hostnames of computers connected to the remote router which has a Windows server providing DNS on the remote router's network.
DNS requests with the suffix of .localnet need to go across the VPN to the DNS server 192.168.2.254, which can be achieved using the DNS Forwarding facility of LAN DNS.
To configure this, go to [Applications] - [LAN DNS / DNS Forwarding], on there select the first available index number by clicking the numbered link i.e. 1.:
In there, click on the Conditional DNS Forwarding tab to configure DNS forwarding:
On the Conditional DNS Forwarding tab, configure the profile as shown:
Tick the Enable tickbox to enable the profile.
Give the profile a suitable name in the Profile field.
Set the Domain Name to be forwarded, in this example, any queries with the suffix of .localnet will be forwarded, which requires a wildcard to be set so it is configured as "*.localnet".
Set the DNS Server IP Address as the address that the DNS queries will be forwarded to, in this example, it's the remote DNS server of 192.168.2.254.
Click OK to save and apply the profile:
With that set, any DNS queries that end in .localnet, for instance pc1.localnet will go through to the remote DNS server of 192.168.2.254 which will allow those requests to resolve without affecting normal internet DNS resolution.
How do you rate this article?
- First Published: 24/03/2015
- Last Updated: 19/08/2021