Sign in to follow this  

Making a DNS Server at home. Do I need to make DHCP also?

Recommended Posts

deep1234    1

Hi guys. 

Some History first. At my parents house they are having some issues with ISP router as it cant access some specific sites (Like YouTube). I did some check up and it seems that it has to do with DNS as I test OpenDNS on the client PCs and it is working fine.

As with the geographic location, OpenDNS is far with 300+ ms also the locate ISP DNS is about 150 to 200 ms. So making a local DNS server is the best option for me.

By using a spare old PC (that with intel Core2Duo). I will set it up and make the ISP router point to it as DNS 1 option and the DNS 2 with DNS 3 will be pointed somewhere else as backup.

Note: 

1 - We can exchange the router with the ISP. But first we need for technian visit plus router price which will cost. I want to try this first for the fun of it.

2 - It is possible for the ISP router not to work properly with the local DNS server. But there is only one way to find out.  

3 - I will make it as an automatic update and restart during specific times. 

4 -  Yes, it could be overkill. But I want to see how is goes. 

The question here. Should I disable the DHCP in the ISP router with this and enable it on CentOS with the DNS? Or it is not related? As I want them to continue use the internet even if the DNS server is off.

Thanks,

Share this post


Link to post
Share on other sites
+BudMan    2,901

You do understand you can set your router to use opendns right..  No need to use a spare PC..

 

If you were going to use a PC I would have it replace the whole router - pfsense on it for example. https://www.pfsense.org/

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
deep1234    1
1 minute ago, BudMan said:

You do understand you can set your router to use opendns right..  No need to use a spare PC..

 

If you were going to use a PC I would have it replace the whole router - pfsense on it for example. https://www.pfsense.org/

 

 

 

I do. I didn't do it since it will be slow for sure. But I will give it a try and see how it goes.

 

I used to have a Linux router with clearOS and it was superb for years. But I am forced to use the ISP router for higher internet speed. Since it is required for a specific upnp setup they use. 

Share this post


Link to post
Share on other sites
+BudMan    2,901
11 minutes ago, deep1234 said:

Since it is required for a specific upnp setup they use

 

What?  Pfsense support UPnP.. If your dns is slow because using isp dns on router.  And you point your clients to opendns - why would it not be better pointing the router to opendns?

 

What "router" from the isp do you they have?  Most likely if they have high speed internet its a cable gateway...  Please post up make and model.

 

BTW you say the isp dns is 100+ ms to respond??  You have a ISSUE there that has nothing to do with dns..   What is the response time to your isp gateway?  Did you just reboot this router?  While your isp dns might be crap you sure shouldn't be 100+ to respond to something that is cached..

 

Where exactly are you on the planet that google dns is 300ms??  South pole?   You have something wrong with your internet if google dns is 300ms away from you.

 

You in UAE.. that is only about 210-220ms away from Chicago... So how is it that googledns could be 300ms away from you??  Its not really possible..

 

Share this post


Link to post
Share on other sites
Daedroth    423

What about using Google's DNS of 8.8.8.8, instead of OpenDNS? You may (or may not) find better latency results.

  • Like 1

Share this post


Link to post
Share on other sites
GrayW    90

As @BudMan keeps responding faster than me (I'm seriously beginning to think you're a bot!) with the sensible answers - listen to him!

 

And if we're looking at things purely for the "fun of it" angle, remember there are plenty of options out there when it comes to DNS servers available. Just be careful which ones you choose and do your research on the provider. Give something like https://github.com/google/namebench a go, and see which servers respond best for your location.

 

Setting up your own server:

Quote

Should I disable the DHCP in the ISP router with this and enable it on CentOS with the DNS? Or it is not related? As I want them to continue use the internet even if the DNS server is off.

You could do that, but they are separate services and can run from different places. But if the server is off and the computer can't get a DHCP lease, you're going to have issues. The simple solution to that is to use static IP configs on each device but depending on the number of devices, that could become a pain in the ass.

So, unless the server is going to run 24/7 you may as well keep the DHCP service running from the router. Also, if you're primary DNS is set to the server that's turned off you're going to experience delays in sites loading. I'm not entirely sure what the default timeout is, probably minimal.

Share this post


Link to post
Share on other sites
+BudMan    2,901

Ah good catch on the opendns, for whatever reason I read that as googledns ;)

 

I would be interested in the response time to google dns since it anycast and located all over the globe..  But if his own isp dns is 100ms -- something is wrong!!!  There has to be a closer better dns..  But there is no reason for him to run some box as dns if only problem is slow dns.. He can just set his router to use the faster dns, or for that matter just have his machines use them directly.

 

But if he want to play with a PC -- I would use it as his router/firewall, which can do dns, dhcp, etc. etc.

Share this post


Link to post
Share on other sites
stefan88    0

Unless the server is going to run 24/7, you may keep the DHCP service running from the router. Set your router to use opendns. For router issues, check this: 192.168.0.1

Share this post


Link to post
Share on other sites
nicedreams    5

Pi-Hole is a very good project that might help you out since it's DNS related.  It's mainly for blocking ad's on your entire network while browsing the internet, but since it's DNS related it may help your resolution be faster.

 

Pi-Hole - Raspberry Pi Ad Blocking DNS Server

https://pi-hole.net/

 

Edit: After re-reading the post don't know if this is for you, but might help anyways...

  • Like 1

Share this post


Link to post
Share on other sites
xendrome    4,369

Even if you run a local DNS server, that local DNS server is going to have to run lookups for non-cached domains and it's going to take the same amount of time if not longer. Since now you are resolving from a local DNS server then out a a 3rd party or root server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.