Solved

Internal DNS issue

Posted on 2014-02-10
10
238 Views
Last Modified: 2014-04-18
Ive setup a A record on a public DNS server to point to an internal IP. For example myTV.google.co.uk (I know my domain isnt google, its just an example) to point to 192.168.1.145, when I ping myTV.google.co.uk it doesnt resolve to any IP address, and when I try it using my browser I get page cannot be displayed.

Its always fascinated me why it doesn't work as from my understanding it should just pull the IP from the DNS record and then point to an internal IP, it shouldnt matter the DNS server cannot see it.

Is there an issue doing this? I know its probably not best practise, but assumed this is an easier way of doing a few items without setting up a DNS server at home.

Thank you in advance
0
Comment
Question by:tonelm54
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 35

Expert Comment

by:Mahesh
Comment Utility
When you are setting up host record on public dns server, how can it recognize private IP address range ?

That is why public IP are public IPs and private IP are private

If you want you can create above zone in your internal network DNS and said private IP host record
In that case you will get name resolution from private IP
But if you try to open any web page on that private IP through internet explorer that is having proxy settings, you will get error because IE will look for proxy 1st and then DNS
You need to bypass proxy for that url

Mahesh
0
 
LVL 12

Expert Comment

by:ktaczala
Comment Utility
myTV.google.co.uk <<< this needs to point to your Public IP the one that is at your location and goes out to the internet (Check what it is with: http://whatismyip.com).  If it's not a static IP you'll need something like zoneedit or dyndns to auto update your dns zones.

Anyway once you have the above done, your router /firewall needs to route port 80(Web site) to 192.168.1.145.  That's called port forwarding. Then it will work.
0
 
LVL 18

Expert Comment

by:sarang_tinguria
Comment Utility
If we are talking about 2-5 systems then you can think of editing host file located in
C:\windows\system32\drivers\etc\

Below is the standard example of host content
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost


Just Add 192.168.1.145 so it will look like

#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1           localhost
192.168.1.145   myTV.google.co.uk
0
 

Author Comment

by:tonelm54
Comment Utility
I understand if I goto myTV.google.co.uk it will return an internal IP address and I wont be able to access it externally, but should be able to internally surely.

The reason Im putting it on a public DNS is so I dont need to setup an internal DNS server, bit lazy but from what I see it should work shouldnt it?

Thank you
0
 
LVL 13

Expert Comment

by:Santosh Gupta
Comment Utility
Hi,

Seems you want to access myTV.google.co.uk. then you need to do following.

1. create myTV.google.co.uk site (that you have already done).
2. Register myTV.google.co.uk, (that you have already done).
3. take a public IP (not private as you are thinking),  put that IP to your router.
4. Create DNS record for your myTV.google.co.uk and map with your Public (router) IP.
5. Open the port 80 and create a rule (NAT) on your router to MAP your http traffic to your 192.168.1.145

Now you should be able to access your site on internet.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 35

Expert Comment

by:Mahesh
Comment Utility
You can access web site from internal network if you creates zone in internal DNS server for site and create host (A) record with private IP

There is nothing wrong in it and it is called as Split DNS where same url can be accessed in intranet by private IP and through public IP on internet

The another alternative is to create zone in internal DNS server for site and point it to directly to public IP address

But creating Host (A) record on public DNS server pointing to private IP will never works
Because it doesn't understand \ support private IP address and cannot route to your internal network

Mahesh
0
 

Accepted Solution

by:
tonelm54 earned 0 total points
Comment Utility
Not sure whats happened, but I have just deleted and re-added and it worked for 2 weeks, then stopped working.

Ive setup the A record as mypvr.local.mydomain.com to point to 192.168.1.70 which after 48 hours worked fine and I could ping it fine, however after 2 weeks it stopped working.

Deleted and re-added and worked fine again after 2 days. Tried using heartinternet and 1and1 which have the same issue. Not sure if its their terms and conditions that auto-delete it, cant find anything though, and their support say it shouldnt work anyway :-S
0
 

Author Comment

by:tonelm54
Comment Utility
If everyone is happy I can just close this question and split points evenly between everyone?
0
 
LVL 13

Expert Comment

by:Santosh Gupta
Comment Utility
if above post is not solved your query then you donot need to share points, you can close the question by selecting your comment as solution.
0
 

Author Closing Comment

by:tonelm54
Comment Utility
Not sure whats happened, but I have just deleted and re-added and it worked for 2 weeks, then stopped working.

Ive setup the A record as mypvr.local.mydomain.com to point to 192.168.1.70 which after 48 hours worked fine and I could ping it fine, however after 2 weeks it stopped working.

Deleted and re-added and worked fine again after 2 days. Tried using heartinternet and 1and1 which have the same issue. Not sure if its their terms and conditions that auto-delete it, cant find anything though, and their support say it shouldnt work anyway :-S
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article explains how a domain name may be inadvertently appended to all DNS queries. This exhibits as described below. (CODE)And / Or: (CODE) Cause This issue can occur in either of these two scenarios. EITHER 1. A Primary DNS S…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now