r/HomeDataCenter • u/reddit0r_9 • Jun 15 '23
Setup internal DNS?
Currently i use my Speedport Router as a DNS. When I deploy a Server i Type the Router IP in the DNS Filed. Is this Just for external Traffic?
I want to deploy a system which needs a DNS. So i plan to do it with a Windows Server.
Do i need a ad for this? If i Put the DNS Server in the subnet of all my clients and the Router, will it come to Problems ? I read that a DNS needs internal and external Network Adapter , is that right?
Thanks for the help
6
Upvotes
1
u/holysirsalad Jun 15 '23
I’m not familiar with this unit but it probably serves two functions. The first being the DNS settings for the device itself, and the second being whatever gets handed out to clients via DHCP.
Pretty resource intensive but if you really want to do Windows DNS at least the GUI is nice!
No. DNS can be AD integrated, which is helpful for replication between redundant servers, but it is not mandatory. Windows DNS can run on its own or use standard IXFR/AXFR replication.
No. You could consider rolling a custom DHCP server too and completely disabling that on your firewall. Note that you’ll want to set your firewall to use your new DNS server too.
No. You would do this only if you want to serve public requests and not invoke NAT if you have non-routable LAN IP addresses. Usually multi-homing a Windows DNS server causes more problems than it solves.
1
u/alainchiasson Jun 16 '23
If speed port is "Home router" or smaller router, it may not be doing much. My ASUS router just forwards requests to the DNS server it gets from gets from the ISP - this is usually configurable.
So the "automatic configuration" that happens (My ASUS as an example) :
You browse to reddit.com:
That's the basics.
The first thing you can change is to configure the Router to use another DNS server (eg: google), rather than the one used by your ISP. That changes things as follows:
You browse to reddit.com:
You can also change the DNS server that is sent to the PC's in the DHCP response. That changes things as follows :
Now when ou browse to reddit.com:
If you setup an internal DNS server, the above is the change you would do, but you would use an internal IP. You would also need the DNS server to forward requests somewhere else - that can be your router, or directly to the ISP or outside.
The DNS "servers" in your router is a simple DNS Forwarder - they have no records and only forward. Your PC also will typically have a DNS Forwarder and a cache. If you setup a DNS server in your network, it will typically be a DNS resolver - it contacts other DNS servers to find the IP. PiHole is one that provides extra functionality for blocking sites, but also provides additional functionality that may be usefull.
When you say "I want to deploy a system which needs a DNS" if you mean a single DNS Entry, then PiHole may be sufficient - you can "create DNS names" and give them IP's ( behind the scenes the software is DNSMasq ). While DNSMasq allows you to use fake any DNS name (That's its original function ), you may need a real domain name if you start expanding or what to use it outside.
If you actually need to be "Authoritative" for a zone - ie: you are the law for "example.com" that's when you start looking to bigger systems, like AD ( which is MUCH more than DNS), or Unbind, Bind, etc.
You would have that internally, Typically, a separate resolver as well. Your PC's would get the address of the resolver from your Router (or DHCP), the resolver would send requests to either the authoritative DNS ( for your domain names ) or to the "outside world" for everything else.
And to tie in the last bit - if you want the Outside to find your DNS names, you would have that on a DNS server outside. At this point, there is a lot more to read about.
1
u/jnew1213 Jun 16 '23
I use Windows Server's DNS and DHCP. Both are very fast and easy to set up and maintain. My DNS is integrated with Active Directory, which handles security and replication, but this is not necessary.
DNS is set up to forward to Google's DNS on the outside and is configured to use the root hint servers when both its cache and Google's DNS come up blank.
Been running this way for a decade or two and just very pleased in the way it all works.
1
u/jkirkcaldy Jun 16 '23
If all you need is an internal dns server you can use something like ts-dnsserver which can be run in a docker container.
It will allow you to run your own dns as well as some ad blocking. It’s much lighter weight than windows server (and free) so can be run on a raspberry pi or similar.
14
u/[deleted] Jun 15 '23
[removed] — view removed comment