• April 24, 2024, 12:15:28 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Resolve Domain Name to Local Internal IP Address  (Read 8295 times)

KevFire

  • Level 1 Member
  • *
  • Posts: 1
Resolve Domain Name to Local Internal IP Address
« on: July 15, 2015, 02:24:05 AM »

Hi Everyone. Hope you well.

I have a Dlink DFL-260E firewall which is behind a Cisco router which handle the internet connection. DNS relay is setup and Everything is work well.

Can anyone guide me on how to resolve a domain name to a local ip address.

I have a windows webserver e.g.. 192.168.1.252.  I want, when users on the local network go to a certain domain e.g. (test.testing.com) to be resolved to the
local IP 192.168.1.252.

I would appreciate your assistance very much.

Thank you.
Elton

Logged

PacketTracer

  • Level 4 Member
  • ****
  • Posts: 441
Re: Resolve Domain Name to Local Internal IP Address
« Reply #1 on: July 21, 2015, 03:57:16 PM »

Hi Elton,

Quote
DNS relay is setup.

According to the DFL-260E manual the DFL-260E doesn't have a DNS relay function. Hence I guess the DNS relay function is located on your Cisco router?

DNS resolution of local host names (e.g. your local webserver 'www' or any other local host name) inside some freely definable unregistered local domain (e.g. 'home.local') can only be provided by a local DNS server that is authoritative for the forward lookup zone 'home.local' and the corresponding reverse lookup zone 1.168.192.in-addr.arpa (according to your LAN network 192.168.1.0/24). This local DNS server would then resolve 'www.home.local' to your local webserver's IP address 192.168.1.252 and vice versa, given the DNS zone files include the corresponding resource records:

Zone file home.local:

$ORIGIN home.local.
@                IN SOA    ...
                 IN NS     ns.home.local.
ns               IN A      192.168.1.253
www              IN A      192.168.1.252


Zone file 1.168.192.in-addr.arpa:

$ORIGIN 1.168.192.in-addr.arpa.
@                IN SOA    ...
                 IN NS     ns.home.local.
253              IN PTR    ns.home.local.
252              IN PTR    www.home.local.


Let's say you setup such a local DNS server 'ns.home.local' which resides on a host with the IP address 192.168.1.253. The following configuration steps should provide a solution:
  • Within the DFL-260E GUI define the following DHCP options (chapter 5.2 of the manual):

    Primary DNS: 192.168.1.253
    Secondary DNS: IP address of your Cisco router's DNS relay
    Domain: home.local

    Due to these settings, any local DHCP client will use your local DNS server for name resolution and will fall back to use your Cisco router's DNS relay in case your local DNS server is down. Local host names that are no FQDNs (do not terminate with a '.') will automatically be appended the DNS search suffix 'home.local'. Hence 'http://www' would effectively resolve 'http://www.home.local'.

  • Configure any non-DHCP client statically to use the address 192.168.1.X/255.255.255.0 and the default gateway 192.168.1.1 (or what else your DFL-260E's LAN IP address is). Configure its DNS client to primarily use your local DNS server 192.168.1.253 and your Cisco router's DNS relay IP address as a second choice for name resolution. Set the DNS search suffix manually to be 'home.local'.

  • Configure your local DNS server statically to use the address 192.168.1.253/255.255.255.0 and the default gateway 192.168.1.1 (or what else your DFL-260E's LAN IP address is). Configure the DNS client of your DNS server to use itself (127.0.0.1 or 192.168.1.253) for name resolution. Set the DNS search suffix manually to be 'home.local'.

  • Allow your local DNS server's zone files 'home.local' and '1.168.192.in-addr.arpa' to be dynamically updatable (DDNS). Hence all LAN clients (no matter if configured statically or dynamically via DHCP) can register themselves with DNS if they are configured to do so. Alternatively you can write zone file's resource records manually given all LAN clients are manually configured or DHCP client's IP addresses are fixed due to reservation inside the DHCP server (always assign the same IP address to a DHCP client identified by its MAC address).

  • You can leave your local DNS server in its default configuration, where it will do an iterative name resolution (starting with one of the Internet root name servers) for any name outside its local zones. Or you configure your DNS server to recursively forward any request, that cannot be answered locally, to your Cisco router's DNS relay or any other publicly available DNS resolver (e.g. your ISP's or Google's DNS resolver).

PT
« Last Edit: July 21, 2015, 04:44:38 PM by PacketTracer »
Logged