question

BartoszMilewski-1692 avatar image
0 Votes"
BartoszMilewski-1692 asked BartoszMilewski-1692 answered

DNS Server works only in local network

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-dns
1.png (18.3 KiB)
2.png (18.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cthivierge avatar image
0 Votes"
cthivierge answered cthivierge edited

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BartoszMilewski-1692 avatar image
0 Votes"
BartoszMilewski-1692 answered

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



3.png (27.9 KiB)
4.png (9.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cthivierge avatar image
0 Votes"
cthivierge answered

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


dns1.png (5.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BartoszMilewski-1692 avatar image
0 Votes"
BartoszMilewski-1692 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.