Internal DNS server but can't access externally hosted website

8,568

Solution 1

The simple question to ask here is;

What IP is returned when you ping mydomain.com or www.mydomain.com?

Is it the correct address?

If not, then you've either cached a response, have not reloaded the zone or have not edited correctly.

I'd assume the response should now be a public IP rather than a private.

You should also query the DNS server directly as opposed to 'pinging';

dig @dns_server_ip mydomain.com A

Solution 2

Returning different DNS records depending on who asks

Share:
8,568
Jake Wilson
Author by

Jake Wilson

Updated on September 17, 2022

Comments

  • Jake Wilson
    Jake Wilson over 1 year

    First some background:

    Our small business used to run our own bind/named nameservers for our domain name:

    • ns0.mydomain.com
    • ns1.mydomain.com

    These were servers that were physically in our server room, accessible to the internet. Anyone who made requests to whatever.mydomain.com, would get their DNS info from these servers and then they could connect to the proper IP address, be it our SFTP/SSH server, our VPN server, our internally hosted website, etc...

    As I just mentioned our website was also internally hosted. When anyone on the internet wanted to visit our website: http://www.mydomain.com, they would be viewing the website that was hosted on our server in our server room.

    Recently, in order to save money and avoid downtime hassles, we've switched to using GoDaddy to host our website. We have also opted to use GoDaddy's nameservers.

    With these changes, we have gotten rid of our internal web server, cause its no longer needed. We have also shut down external access to our DNS servers, since anyone on the internet attempting to access anything.mydomain.com is going to be connecting to GoDaddy's nameservers for that info.

    We still need to host the nameservers for internal use however. That way Bob can ssh to one of our servers using the address bigserver or bigserver.mydomain.com.

    Now this is where the problem comes in. From inside the network, we cannot access our website (http://mydomain.com or http://www.mydomain.com) that is hosted on GoDaddy. I thought simply changing the mydomain.com A Record on our DNS servers to point to the IP address that GoDaddy is hosting the website on would suffice. But our browsers are not finding it. The IP is pingable though.

    I'm sure there is something I'm missing with regard to named. I am far from a bind/named expert. I can trip and stumble my way through it but thats about it. Any help would be greatly appreciated.

    And if there is certain key bits of info you need me to copy/paste from my named config's just let me know.

  • Spence
    Spence over 13 years
    This isn't a problem looking for "views" as a solution. The OP has a DNS server behind his firewall ("internal") that's authoritative for a domain that's also being hosted outside the firewall ("external"). He needs the IP addresses for the various external resources to be included in his internal zone, such that his internal DNS server appears to have complete information for both the internal and external resources. He indicates in his posting that nobody on the Internet is using his internal DNS server anymore and that it's only used for internal users.