DNS Server works only in local network

Bartosz Milewski 21 Reputation points
2021-10-14T12:44:51.727+00:00

Hi all, I'm new in Windows Server 2019 and I would like to ask question about DNS server with I'm trying configure from last couple days.

I set up a DNS server on a host computer that has an internal ip address: 192.168.1.39. The Server with the primary zone named homeserver-dns01.milewski.me runs on this address.

On the server I have a virtual machine installed on which there is another Windows 2019, which also has a DNS server installed for secondary DNS called homeserver-vm.milewski.me and an ip address: 192.168.1.6

After checking that both machines are communicating with each other via ping in the console, the two machines see each other on the network. Thats fine. After typing nslookup on both machines I have answer from host server:

140594-1.png

and nslookup from virtual machine:140589-2.png

Everything works so far. Entering the address www.milewski.me opens my website on the server (IIS Windows 2019) and this website works only in the local network, both via cable and wifi. However, after setting dns at the operator where I have purchased the www.milewski.me domain, I cannot poll my website from outside the local network.

In the domain panel (godaddy.com), I entered:

Name server 1: homeserver-dns01.milewski.me

Name server 2: homeserver-vm.milewski.me

What am I doing wrong? Why can't I connect to the server from outside the local network when I enter the website address?

Thank you for your help

Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,021 questions
0 comments No comments
{count} votes

Accepted answer
  1. cthivierge 4,056 Reputation points
    2021-10-14T12:59:39.857+00:00

    Your record has been published using your private IP Address and not a public Address...

    Look what i have from my computer when i enter www.milewski.me

    www.milewski.me

    Server: MyDNSServer
    Address: 192.168.1.99

    Non-authoritative answer:
    Name: www.milewski.me
    Address: 192.168.1.6

    So you must ensure that the www record is published with a public IP Address and not a private IP Address

    Google DNS is also giving you the same thing.

    www.milewski.me

    Server: dns.google
    Address: 8.8.8.8

    Non-authoritative answer:
    Name: www.milewski.me
    Address: 192.168.1.6

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Bartosz Milewski 21 Reputation points
    2021-10-14T14:57:09.843+00:00

    Thank you so much! Everything seems to be working now. Last question, below is my records setup. Currently my website works after entering www.milewski.me but after entering only milewski.me the site is not available. What should the record for milewski.me look like? the same but without the www prefix?

    140683-3.png

    140643-4.png

    0 comments No comments

  2. cthivierge 4,056 Reputation points
    2021-10-14T15:48:21.807+00:00

    Have you tried to create an empty A record that point to your Web server ?

    140596-dns1.png

    To test it, flush the cache on your client (ipconfig /flushdns) and try again

    0 comments No comments

  3. Bartosz Milewski 21 Reputation points
    2021-10-14T15:49:53.003+00:00

    Yes Im trying make another record to redirect for milewski.me. www.milewski.me works fine.

    0 comments No comments