DNS time out (was Using DNS server to stop local domains going through internet)

Peter Silva peter at bsqt.homeip.net
Sat Jul 16 10:37:29 UTC 2016


fwiw, I run debian on a raspberry pi3 for my firewall/router, much
easier for and old linux guy to deal with than the web faced canned
boxes, and guaranteed to get security updates far ahead of consumer
grade routers.
If you like pi, it makes a great choice for a router for an internet
link for a house.


On Sat, Jul 16, 2016 at 5:52 AM, Ben Edwards <list4me2 at gmail.com> wrote:
> All working and setup, seems to work great.
>
> One slightly strange thing is after I set it up I tested it by changing DNS
> on a windows 7 laptop and it worked fine.  I then changed the DNS on our
> ASUS DSL-N66U and it did not work.  I trn tried changing the DNS on our
> Ubiquaty syatem and it did not work.  I then moved the Pi into our server
> room and not even the laptop worked.  I went and did some other stuff for a
> while (after removing the DNS from the router and Ubiuarty system).  Then
> noticed the DNS was working on the laptop so changed it on the Ubiquaty
> system and it seemed to work.  Any idea why this is? Does changing DNS
> normally make things go flaking for a few minutes?
>
> Thanks,
> Ben
>
> On 15 July 2016 at 14:04, Ben Edwards <list4me2 at gmail.com> wrote:
>>
>> Thanks, dnsmasq this sound very cool and just the ticket.
>>
>> The main thing I am trying to do is have prsc.noip.me resolve to
>> 192.168.0.50, not the DyDns IP (which is then send to the router and
>> forwarded to 192.168.0.50).
>>
>> Sounds like I just setup dnsmasq and put
>>
>> 192.168.0.50      prsc.noip.me
>>
>> in /etc/hosts on the server and that is it?
>>
>> I also liked the fact that bind allowed me to give machines on the local
>> computers and they would resolve through my local DNS.  So I guess i also
>> just put them in the hosts file.
>>
>> In terns of DHCP is there any benefit of moving it from the ASUS router to
>> the Pi?  I really like the web interface on the router and dont want to
>> loose this.
>>
>> Currently I was setting up BIND on a Rasbery Pi.   Could I set up dnsmasq
>> on the same server as owncloud? or more to the point is this a good idea.  I
>> I like the idea of setting up the local DNS on a Pi 2 as they are simple and
>> stable without any moving parts.  Not having to worry about the DNS server
>> going titsup seems an excellent idea. It is servicing around 20 computers
>> and possible 50 mobile phones/tablets (when we have events).   Anyway out
>> DHCP range is 75-253 so its less than 200 devices, so I guess the Pi can
>> take this in its stride.  I will be monitoring it with Zabbix anyway so will
>> see if it gets overloaded.  OK, ive convinced myself, the Pi is it for DNS:)
>>
>> Thanks for your help.
>>
>> Ben
>>
>>
>>
>>
>>
>> On 15 July 2016 at 04:29, Peter Silva <peter at bsqt.homeip.net> wrote:
>>>
>>> dnsmasq is more than a simple cache... it's a 'do the right thing for
>>> a small home environment thing'.  For example, to advertise local
>>> services, just put them in /etc/hosts, and dnsmasq picks them up.  As
>>> another example, as soon as you are finished setting up bind, you will
>>> realize that it doesn't do dhcp, and you'll want to setup the isc-dhcp
>>> server that matches.  dnsmasq does dhcp as well, kind of for free.
>>>
>>> I don't get what problem you are solving, so it's hard to help.
>>>
>>>
>>> If you really want to use bind9 and isc-dhcp-server and you want a
>>> simple way to do it, I wrote this to make it less monotonous:
>>>
>>> https://github.com/petersilva/si46ib9d
>>>
>>> It does both bind and dhcp server configs for IPv4 and IPv6 for a
>>> typical home setup (with split-horizon.) just did it to automate my
>>> maintenance at home, as normally you have to enter hostnames and
>>> addresses three or four times for the ISC tools.
>>>
>>>
>>>
>>> On Thu, Jul 14, 2016 at 7:12 PM, Ben Edwards <list4me2 at gmail.com> wrote:
>>> > Ok, thanks for relying.
>>> >
>>> > I don't think its the DNS lookup that is sowing things down, I think it
>>> > is
>>> > the fact that all the traffic is routed through the net rather than
>>> > locally
>>> > that is causing the problem.  So a simple DNS cache is not going to
>>> > solve
>>> > the problem.
>>> >
>>> > I have actually set up a DNS server (bind) and got it working, that was
>>> > fun;)....well almost;(.
>>> >
>>> > I have the basic thing working, just cant do the funky stuff to get
>>> > prsc.noip.me to resolve to the local server rather than the DyDNS
>>> > service.
>>> >
>>> > The zone (db.prsc.noip.me) I am trying to do it with looks like this.
>>> >
>>> > $TTL            604800
>>> > @               IN      SOA     pluto.prsc.localhost. pi.localhost. (
>>> >                                       2         ; Serial
>>> >                                  604800         ; Refresh
>>> >                                   86400         ; Retry
>>> >                                 2419200         ; Expire
>>> >                                  604800 )       ; Negative Cache TTL
>>> > ;
>>> > @               IN      NS      pluto.prsc.localhost.
>>> > @               IN      A       127.0.0.1
>>> > @               IN      AAAA    ::1
>>> >
>>> > ; Beow are the A record addresses
>>> >
>>> > prsc                    IN      A       192.168.0.50
>>> >
>>> > ; Below are the CNAME record addresses (aliuses) - point ot the A
>>> > records
>>> >
>>> > oCserver        IN      CNAME   prsc.noip.me.
>>> >
>>> > But I get an unknown host error when I try to ping prsc.noip.me.
>>> >
>>> > Ben
>>> >
>>> >
>>> > On 14 July 2016 at 13:10, Peter Silva <peter at bsqt.homeip.net> wrote:
>>> >>
>>> >> dnsbind is probably more what you want for this.
>>> >>
>>> >> https://help.ubuntu.com/community/Dnsmasq
>>> >>
>>> >> bind9 is a real pain to set up properly... if you have a need to run a
>>> >> full DNS server and, say advertise maps to servers in the cloud, or
>>> >> you just want to know how to do it, all fine.  If you just want your
>>> >> DNS to be fast and local, dnsmasq is a lot easier to setup, and does
>>> >> the job with less work.
>>> >>
>>> >>
>>> >> On Wed, Jul 13, 2016 at 7:55 PM, Ben Edwards <list4me2 at gmail.com>
>>> >> wrote:
>>> >> > Cople of things I forgot to mention. Firstly the DNS is the same
>>> >> > server
>>> >> > as
>>> >> > owncloud.  also is there anything else I need to setup in bind9?
>>> >> >
>>> >> > On 14 July 2016 at 00:37, Ben Edwards <list4me2 at gmail.com> wrote:
>>> >> >>
>>> >> >> Hi, first thing I should say is I have never setup a DNS and am
>>> >> >> quite
>>> >> >> nervous about breaking our network;).
>>> >> >>
>>> >> >> So, we use owncloud and I want to use a DYDNS domain rather than
>>> >> >> the
>>> >> >> local
>>> >> >> IP address of the owncloud server (for a cople of reasons but
>>> >> >> mainly so
>>> >> >> I
>>> >> >> can set it up on laptops which may be outside the local network).
>>> >> >> Problem
>>> >> >> is if I do this the performance is very bad as it goes throuht the
>>> >> >> internet.
>>> >> >> A bit of digging reviles the way to do this is to setup a DNS
>>> >> >> server
>>> >> >> and
>>> >> >> forward all requests to the upstream server (probably going to have
>>> >> >> to
>>> >> >> use
>>> >> >> the google public ones) unless it is the domain of our owncloud
>>> >> >> server,
>>> >> >> in
>>> >> >> which case we resolve the domain as the owncloud servers local IP.
>>> >> >> Or
>>> >> >> that's what I think I need to do.
>>> >> >>
>>> >> >> I am using Ubuntu 15.10.
>>> >> >>
>>> >> >> I think I need to install bind9 (apt-install bind9 dnsutils).
>>> >> >>
>>> >> >> in /etc/bind/named.conf.options add
>>> >> >>
>>> >> >> forwarders {
>>> >> >>   8.8.8.8;
>>> >> >>   8.8.4.4;
>>> >> >> };
>>> >> >>
>>> >> >> Then to bind prsc.noip.me to 192.168.42.10 (the owncloud server do
>>> >> >> I
>>> >> >> simply put
>>> >> >>
>>> >> >> 192.168.42.10           prsc.noip.me
>>> >> >>
>>> >> >> In /etc/hostname
>>> >> >>
>>> >> >> Well thats my guess, or how do I do it?
>>> >> >>
>>> >> >> Ben
>>> >> >> --
>>> >> >> Ben Edwards, Video Editor and Cameraman
>>> >> >> web:www.nkytwig.com mobile:07773 02 44 82 skype:funkytwig
>>> >> >> twitter:@funkytwig
>>> >> >> iContact Community Video | Bristol Community Channel
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Ben Edwards, Video Editor and Cameraman
>>> >> > web:www.nkytwig.com mobile:07773 02 44 82 skype:funkytwig
>>> >> > twitter:@funkytwig
>>> >> > iContact Community Video | Bristol Community Channel
>>> >> >
>>> >> > --
>>> >> > ubuntu-users mailing list
>>> >> > ubuntu-users at lists.ubuntu.com
>>> >> > Modify settings or unsubscribe at:
>>> >> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>> >> >
>>> >>
>>> >> --
>>> >> ubuntu-users mailing list
>>> >> ubuntu-users at lists.ubuntu.com
>>> >> Modify settings or unsubscribe at:
>>> >> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Ben Edwards, Video Editor and Cameraman
>>> > web:www.nkytwig.com mobile:07773 02 44 82 skype:funkytwig
>>> > twitter:@funkytwig
>>> > iContact Community Video | Bristol Community Channel
>>> >
>>> > --
>>> > ubuntu-users mailing list
>>> > ubuntu-users at lists.ubuntu.com
>>> > Modify settings or unsubscribe at:
>>> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>> >
>>>
>>> --
>>> ubuntu-users mailing list
>>> ubuntu-users at lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
>>
>>
>>
>> --
>> Ben Edwards, Video Editor and Cameraman
>> web:www.nkytwig.com mobile:07773 02 44 82 skype:funkytwig
>> twitter:@funkytwig
>> iContact Community Video | Bristol Community Channel
>
>
>
>
> --
> Ben Edwards, Video Editor and Cameraman
> web:www.nkytwig.com mobile:07773 02 44 82 skype:funkytwig twitter:@funkytwig
> iContact Community Video | Bristol Community Channel
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list