DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

Router local DNS resolve of lan ip addresses.

More
07 Jun 2009 17:05 #56232 by deadkenny
Replied by deadkenny on topic Router local DNS resolve of lan ip addresses.
I'm looking at replacing my old server with a NAS, but my dilemma is choosing what to buy that will provide me with DHCP/DNS because the Vigor just can't do what I want.

Main problem I've got is I have numerous devices that access my home server email via a single address (e.g. mail.mydomain.co.uk), whether from home or anywhere else in the world. All I want is to resolve the internal IP address when at home, and the external from anywhere else, but without having to reconfigure each device. I don't need a proper DNS server for that, just the option to add overriding entries to fix an address to an internal IP address).

The other thought I've got is to have my internal mail server use a public IP and be on the DMZ perhaps. Then it would always use the external IP address and the DNS is resolved by the true DNS server externally.

Draytek Vigor 2700V (2S1L). Firmware: 2.8.3

Please Log in or Create an account to join the conversation.

More
08 Jun 2009 11:26 #56234 by sinkorswim
Replied by sinkorswim on topic This is all a big misunderstanding what DNS is
:)
DNS isn't really about finding local machines, it's about converting FQDN into IP addresses - eg what IP address is www.draytek.com at. It only applies to remote machines and the draytek DNS works well by cacheing a local DNS / IP address resolution - ie if the local DNS can't resolve the address go upstream to the next level up (your ISP's DNS) and query that DNS server then cache the result locally. DNS isn't NetBIOS and it isn't the ARP discovery protocol everyone here is talking about.

As for connecting from external locations to devices inside your network I don't use the DMZ feature as I found it quite hard to configure properly, I use port forwarding feature. Change the port for the admin control panel (by default its port 80) and tell the draytek to forward port 80 traffic to an private internal IP address and job done. In principle you could have 10's of different machines all accessible externally and all on the same public IP address - eg a mail server, ftp server, web server etc etc.

Please Log in or Create an account to join the conversation.

More
08 Jun 2009 16:04 #56240 by deadkenny
Replied by deadkenny on topic Router local DNS resolve of lan ip addresses.
I do the port forwarding already which is no problem.

The problem is my phone, netbook & laptop use the domain name (for example) mail.mydomain.co.uk to connect to the IMAP mail server inside the LAN.

Connecting to that from outside works fine through the port forwarding and NAT config.

Connecting to that from inside doesn't work because mail.mydomain.co.uk resolves to an external IP and the router can't cope with an internal connection resolving the external IP which in turn has to be routed back in via the NAT to the internal IP. Classic common problem which is also why you can't browse to a web site you host inside the NAT, using the public URL or IP address.

However using a local DNS setup you can provide overrides internally so that the domain name resolves to the local internal IP for use internally.

It's exactly what I do now using dnsmasq on my old linux server (which is essentially acting as a more fancy caching DNS server. The same as what the Vigor is doing, but has the ability to provide these local DNS overrides).

Similar in a way to using a hosts file, but the drawback with hosts files is they have to be configured on all machines, and you have to remove the entries if you move your PC/laptop/etc outside of the local LAN and want to resolve the domain to the public external IP. Worse is mobile phones usually don't have an easily configurable hosts file (if one at all).

Draytek Vigor 2700V (2S1L). Firmware: 2.8.3

Please Log in or Create an account to join the conversation.

Moderators: ChrisSami