0

I have a local network with many devices (windows based, android based and, Linux based). I also have one Windows-based server with IIS 10 install on it. On the IIS I have several websites (mostly API's and some MVC's, all of them are ASP.Net CORE based).

On all other devices, I've set the default gateway to be my server. On the IIS I've set all sites to be [SITE NAME].local (api1.local, api2.local etc.). When I try to access those sites from any other device on my network it doesn't work.

I assume I need to do the following 2 steps: 1. Set the default gateway on all those devices to be my server. 2. Create DNS server on my server, and create A records inside this DNS server.

My questions:

  1. Is my assumption correct?
  2. How do I create a DNS server on my windows server? I read something about installing IPAM, but my server is not part of a domain.

PS. I read this post. I don't want to use the hosts file approach since I have multiple devices and keep adding addresses all the time.

Thanks in advance!

Shaul Zuarets
  • 839
  • 2
  • 10
  • 20
  • I don't think the gateway is correct, unless your server does do the routing to the internet or if your normal router refuses to route between devices on its network. And can you be more specific about 'it doesn't work' - it doesn't connect because it can't find the host, or because it times out, or you do connect and get a 404? – Rup Jan 24 '19 at 18:10
  • I thought I need to do the default gateway so the devices would know where to look for the DNS server. It can't find the host. – Shaul Zuarets Jan 24 '19 at 18:12
  • Does it work if you use IP addresses? Or e.g. add an entry to /etc/hosts on your Linux machines? The DNS server is configured by DHCP: hopefully your router will have an option of what DNS server to send with IP assignments, or you could turn off the DHCP server on your router and run your own from the server. – Rup Jan 24 '19 at 18:17
  • Yes, after doing some more reading, it seems I don't need to add the default gateway, but just use the router DNS server abilities (hopefully there are). Is that correct? – Shaul Zuarets Jan 24 '19 at 18:47
  • That sounds right to me, but depends on exactly what your router provides. – Rup Jan 24 '19 at 18:50
  • You don't *need* a DNS server. You could access the site by IP address or you could use a hosts file entry, which is far simpler. If you are having trouble reaching the site from another device I would check to see if the network traffic is getting through using `tracert` or just `telnet`. Chances are there is a firewall or other O/S security mechanism in place that is causing the problem. – John Wu Jan 24 '19 at 21:32
  • Even without an active directory you can set up a DNS server. Talk to your network administrators first. – Lex Li Jan 25 '19 at 04:30

0 Answers0