Announcement

Collapse
No announcement yet.

How to Resolve Local Host name First in Local Network

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Resolve Local Host name First in Local Network

    Hi !

    We Need to configure a desktop with application; which must be accessed outside the company via Internet.
    But orgnal hostname will not resolve the name outside from local Network.

    We did Some Steps as Follows:
    1. Configured Desktop and given hostname (host.domain.com) with an application and
    forwarded there Custom Ports through Firewall.
    2. A dyndns Tool is Installed on Desktop and a hostname(myhost.dyndns.org) registered
    through DYNDNS tool Site.
    3. With our DNS Registrar we created a CNAME and its redirected like myhost.domain.com pointed to
    myhost.domain.com (Whoever pings the myhost.domain.com it will redirect to myhost.dyndns.com)

    Problem: is When user is Connected in Local Network is still Going outside using gateway Address; it must to go first with Local IP and if that
    not responds then it has to use gateway IP to Connect.

    At Server End In DNS we Created Two names which will resolve our single local IP address.

    please correct and suggest !

  • #2
    Re: How to Resolve Local Host name First in Local Network

    Do you have a local DNS server? If not then you'll have to use the HOSTS file.

    If you have a local DNS server, setup a record for myhost.domain.com pointing to the private IP address.

    If you don't have a local DNS server, on all local machines an entry to their HOSTS file for myhost.domain.com.

    If some computers will be in and out of the local network and need access, you will need to use a local DNS server or the users will need to constantly edit their HOSTS file to get things to work.

    Or you can just use a different name internally.
    Regards,
    Jeremy

    Network Consultant/Engineer
    Baltimore - Washington area and beyond
    www.gma-cpa.com

    Comment


    • #3
      Re: How to Resolve Local Host name First in Local Network

      Hi,
      Thanks For reply !
      Yes We have Local DNS Server in that We have assigned this two(host.irpl.com and myhost.irpl.com) Host with single LOCAL IP address.

      How can I force to systems to use myhost.domain.com when they are in local Network ?

      When users connected in Local network, myhost.domain.com has to resolve Local IP address !
      In My setup when I try to Access this server from Local Connected System it goes first to internet not searching in Local DNS entry !

      Please suggest.

      Comment


      • #4
        Re: How to Resolve Local Host name First in Local Network

        You just need to add a DNS zone for myhost.domain.com and make the @ (aka "same as parent") record point to the local IP.
        Regards,
        Jeremy

        Network Consultant/Engineer
        Baltimore - Washington area and beyond
        www.gma-cpa.com

        Comment


        • #5
          Re: How to Resolve Local Host name First in Local Network

          Hi,

          Already in DNS Zone there is a Zone Exist with name "domain.com". and in forward lookup a entry for myhost.domain.com is exist.

          kindly Confirm,
          you mean, a new zone should be created under DNS with the Name of myhost.domain.com ? If I creates this how can i point a hostname. if I done It must be looking like myhost.myhost.domain.com !

          Comment


          • #6
            Re: How to Resolve Local Host name First in Local Network

            Originally posted by swapneel View Post
            Already in DNS Zone there is a Zone Exist with name "domain.com". and in forward lookup a entry for myhost.domain.com is exist.
            If you have a zone for domain.com and a record for myhost then just change it to point to the local IP address.

            Originally posted by swapneel View Post
            you mean, a new zone should be created under DNS with the Name of myhost.domain.com ? If I creates this how can i point a hostname. if I done It must be looking like myhost.myhost.domain.com !
            In DNS using the "@" symbol denotes the current origin. Essentially a record without adding any name. In Windows DNS it shows as "(same as parent folder)". That's how you would set it up. But since you already have a domain.com zone, there's no need to add the myhost.domain.com zone.
            Regards,
            Jeremy

            Network Consultant/Engineer
            Baltimore - Washington area and beyond
            www.gma-cpa.com

            Comment


            • #7
              Re: How to Resolve Local Host name First in Local Network

              Hi,
              Thanks for information;

              just change it to point to the local IP address.
              This is already done ! A Local IP address 192.168.0.6 is pointed to myhost.domain.com and host.domain.com.

              Still The users Goes to myhost.irpl.com via gateway IP address, when they connected in local network.
              Last edited by swapneel; 5th December 2013, 03:11. Reason: Spell

              Comment


              • #8
                Re: How to Resolve Local Host name First in Local Network

                What is the IP address of your local DNS server?
                Please run ipconfig/all on a local workstation and post the results.
                Regards,
                Jeremy

                Network Consultant/Engineer
                Baltimore - Washington area and beyond
                www.gma-cpa.com

                Comment


                • #9
                  Re: How to Resolve Local Host name First in Local Network

                  LOCAL DNS Server IP is 192.168.0.252

                  output of ipconfig /all

                  Windows IP Configuration

                  Host Name . . . . . . . . . . . . : SYSTEM1
                  Primary Dns Suffix . . . . . . . : domain.com
                  Node Type . . . . . . . . . . . . : Unknown
                  IP Routing Enabled. . . . . . . . : No
                  WINS Proxy Enabled. . . . . . . . : No
                  DNS Suffix Search List. . . . . . : domain.com

                  Ethernet adapter Local Area Connection:

                  Connection-specific DNS Suffix . :
                  Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit
                  Ethernet Controller
                  Physical Address. . . . . . . . . : 80-FC-A6-31-62-08
                  Dhcp Enabled. . . . . . . . . . . : No
                  IP Address. . . . . . . . . . . . : 192.168.0.87
                  Subnet Mask . . . . . . . . . . . : 255.255.252.0
                  Default Gateway . . . . . . . . . : 192.168.0.228
                  DNS Servers . . . . . . . . . . . : 192.168.0.252
                  192.168.0.7

                  Comment


                  • #10
                    Re: How to Resolve Local Host name First in Local Network

                    I see you have two local servers configured. Run nslookup against both of your local DNS servers.

                    Type these commands in order:

                    Code:
                    myhost.domain.com
                    server 192.168.0.7
                    myhost.domain.com
                    Verify that both DNS servers are giving you just the local IP address. If they are giving the local IP address then check the HOSTS file on the client. If they aren't then you haven't configured your DNS record correctly.
                    Regards,
                    Jeremy

                    Network Consultant/Engineer
                    Baltimore - Washington area and beyond
                    www.gma-cpa.com

                    Comment


                    • #11
                      Re: How to Resolve Local Host name First in Local Network

                      Hi,
                      I executed command Nslookup and checked the things as suggested by you.

                      Both Servers giving Below results....

                      C:\>nslookup
                      Default Server: dc1.domain.com
                      Address: 192.168.0.252

                      > myhost.domain.com
                      Server: dc1.domain.com
                      Address: 192.168.0.252

                      Name: myhost.domain.com
                      Address: 192.168.0.6

                      > server 192.168.0.7
                      Default Server: dc2.domain.com
                      Address: 192.168.0.7

                      > myhost.domain.com
                      Server: dc2.domain.com
                      Address: 192.168.0.7

                      Name: myhost.domain.com
                      Address: 192.168.0.6

                      Still From Some System when Try to Ping myhost.domain.com it Goes through Deafault Gateway !

                      Comment


                      • #12
                        Re: How to Resolve Local Host name First in Local Network

                        Oh....
                        Finally I observer one thing; to access Internet We added 4.2.2.2 and 8.8.8.8 IP in Forwarders.
                        In our network we are not Using DHCP Server. Few System Not resolves the website name if we provide 192.168.0.252 and 192.168.0.7 as DNS. On this System We were using DNS setting 192.168.0.252 and 8.8.8.8

                        I corrected that to 192.168.0.252 and 192.168.0.7 now it resolving the Name and its working. But For Internet I added Universal resolver IP as above mention is that a good Practice ? Or should I do changes ?

                        Comment


                        • #13
                          Re: How to Resolve Local Host name First in Local Network

                          Ah that makes sense.

                          Well having the clients configured with both internal and external DNS servers will give you problems. The best solution would be to add the records to your DNS zone for your public website. That way clients will be able to use the local DNS and resolve both internal and external resources on the same domain.
                          Regards,
                          Jeremy

                          Network Consultant/Engineer
                          Baltimore - Washington area and beyond
                          www.gma-cpa.com

                          Comment


                          • #14
                            Re: How to Resolve Local Host name First in Local Network

                            Thanks for your Support!
                            But a single query I have here; Can I use 4.2.2.2 and 8.8.8.8 in forwarders ? or I have to add those two IP addresses in advance Option of IP configuration at client End !

                            Comment


                            • #15
                              Re: How to Resolve Local Host name First in Local Network

                              Use them as Forwarders on the DNS server - absolutely not on the clients, which should contain local DNS servers only
                              Tom Jones
                              MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
                              PhD, MSc, FIAP, MIITT
                              IT Trainer / Consultant
                              Ossian Ltd
                              Scotland

                              ** Remember to give credit where credit is due and leave reputation points where appropriate **

                              Comment

                              Working...
                              X