Re: [Dnsmasq-discuss] dns server

2015-04-15 Thread Linux Luser
Ah, yes. You will have to add the host-record=mydomain.com,192.168.0.101
line as we discussed earlier.
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dns server

2015-04-15 Thread Thiago Farina
On Wed, Apr 15, 2015 at 6:06 PM, Linux Luser  wrote:
> Maybe something like this will help:
> https://gist.github.com/linuxluser/cf8f967c9ec8167e6fed
>
How will it translate mydomain.com to 192.168.0.101?

Does it need an address= line?

> I tried to keep it minimal. Read the comments and change things to your
> liking. Again, that conf file applies to the SERVER, which should be running
> a standard version of dnsmasq, not the one that comes with NetworkManager.
>
>
> To address the other problem, NetworkManager has taken control of your
> /etc/resolv.conf file and will pretty much overwrite it whenever it wants
> (usually during DHCP renewals). There are ways to work around this, but it's
> going to start getting complicated. The easiest thing to do would be to turn
> off network-manager and configure your interfaces via
> /etc/network/interfaces file instead. Again, this is for the server only.
> For other machines (clients) on your network, network-manager would probably
> work just fine. Despite network-manager's insistence that it can be used for
> servers, there are still issues with that idea (namely, you'd have to do
> away with all the tried-and-true network configuration files and tools that
> most use on servers).
>
> On Wed, Apr 15, 2015 at 9:15 AM, Thiago Farina  wrote:
>>
>> On Tue, Apr 14, 2015 at 11:38 PM, Linux Luser 
>> wrote:
>> > I'm not sure if NetworkManager's version is better or worse for your
>> > case.
>> > My understanding was that it is specifically configured to provide DNS
>> > services to the localhost only. I think you should install the regular
>> > dnsmasq for your distro if you are using it as a core service for your
>> > whole
>> > network.
>> >
>> > On Debian-based systems, for example:
>> >
>> > $ sudo apt-get install dnsmasq
>> >
>> After doing this, my /etc/resolv.conf contains only 127.0.0.1.
>>
>> I did try updating it by running the following command lines:
>>
>> $ sudo dpkg-reconfigure resolvconf
>>
>> And
>>
>> $ sudo resolvconf -u
>>
>> And nothing were able to pull the nameservers from my router now. :/
>>
>> I had to manually edit it in order to get back access to internet.
>>
>> Why is that? What updates resolv.conf from my router's config?
>>
>> --
>> Thiago Farina
>
>
>
>
> --
> daV.e
>
> "The reasonable man adapts himself to the conditions that surround him...
> The unreasonable man adapts surrounding conditions to himself... All
> progress depends on the unreasonable man." Bernard Shaw



-- 
Thiago Farina

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Failure to respond to DHCPDISCOVER messages after changed time on router

2015-04-15 Thread John Knight
After thinking about this a little more, lease renew is generally initiated by 
the clients, so I don't think this would work.  What if there was an API that 
would take the old time and the new time and pass it to dnsmasq so that it 
could come up with a delta time and then adjust all of the leases it has under 
its control?  I think this would work.  However, I am not sure why it stops 
responding to DHCCPDISCOVER.  After updating the leases, perhaps dnsmasq needs 
to be restarted as well to put it into a good state.

John


Hi,


We discovered that a change in the router's time via NTP will cause dnsmasq to 
stop answering DHCPDISCOVER.  In the wan.cap, NTP server gives an earlier time 
to the DUT and cause the dhcp server to stop working (ie. Answering 
DHCPDISCOVER)

Our DUT's time is Aug 5, 2015 16:19:22.575786000, but NTP server provides Aug 
5, 2015 16:00:19.588536000 which is about 19 mins before the DUT's time. Thus 
the dhcp server stop to work until 19mins later. During this 19 minute time 
period, dnsmasq does NOT answer dhcpdiscover or give out IP leases. After 19 
minutes has expired, we see dnsmasq come back to life and begin answering 
dhcpdiscover messages again.

I realize that this is an abnormal scenario, but we need to safeguard against 
this kind of failure.  It is showing up in our testing.  One thought on 
preventing this would be to in effect do a lease renew after the time has 
changed on the router.  I am not sure how to cause dnsmasq to refresh all of 
it's leases?  Or should we be more forceful and force expiration of the leases 
and restart dnsmasq?  Any suggestions on how to best handle this scenario?

One concern we have too is security.  If the NTP messages are hijacked and the 
time is changed, it could cause dnsmasq to stop functioning thus affecting the 
router's users.  So, I think its necessary that we address this.  Hopefully 
someone has some recommendations on how to deal with this.

Regards,  John







__ Confidential 
This e-mail and any files transmitted with it are the property of Belkin 
International, Inc. and/or its affiliates, are confidential, and are intended 
solely for the use of the individual or entity to whom this e-mail is 
addressed. If you are not one of the named recipients or otherwise have reason 
to believe that you have received this e-mail in error, please notify the 
sender and delete this message immediately from your computer. Any other use, 
retention, dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited. Pour la version fran?aise: 
http://www.belkin.com/email-notice/French.html F?r die deutsche ?bersetzung: 
http://www.belkin.com/email-notice/German.html 
__
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Failure to respond to DHCPDISCOVER messages after changed time on router

2015-04-15 Thread John Knight
Hi,


We discovered that a change in the router's time via NTP will cause dnsmasq to 
stop answering DHCPDISCOVER.  In the wan.cap, NTP server gives an earlier time 
to the DUT and cause the dhcp server to stop working (ie. Answering 
DHCPDISCOVER)

Our DUT's time is Aug 5, 2015 16:19:22.575786000, but NTP server provides Aug 
5, 2015 16:00:19.588536000 which is about 19 mins before the DUT's time. Thus 
the dhcp server stop to work until 19mins later. During this 19 minute time 
period, dnsmasq does NOT answer dhcpdiscover or give out IP leases. After 19 
minutes has expired, we see dnsmasq come back to life and begin answering 
dhcpdiscover messages again.

I realize that this is an abnormal scenario, but we need to safeguard against 
this kind of failure.  It is showing up in our testing.  One thought on 
preventing this would be to in effect do a lease renew after the time has 
changed on the router.  I am not sure how to cause dnsmasq to refresh all of 
it's leases?  Or should we be more forceful and force expiration of the leases 
and restart dnsmasq?  Any suggestions on how to best handle this scenario?

One concern we have too is security.  If the NTP messages are hijacked and the 
time is changed, it could cause dnsmasq to stop functioning thus affecting the 
router's users.  So, I think its necessary that we address this.  Hopefully 
someone has some recommendations on how to deal with this.

Regards,  John







__ Confidential 
This e-mail and any files transmitted with it are the property of Belkin 
International, Inc. and/or its affiliates, are confidential, and are intended 
solely for the use of the individual or entity to whom this e-mail is 
addressed. If you are not one of the named recipients or otherwise have reason 
to believe that you have received this e-mail in error, please notify the 
sender and delete this message immediately from your computer. Any other use, 
retention, dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited. Pour la version fran?aise: 
http://www.belkin.com/email-notice/French.html F?r die deutsche ?bersetzung: 
http://www.belkin.com/email-notice/German.html 
__
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dns server

2015-04-15 Thread Linux Luser
Maybe something like this will help:
https://gist.github.com/linuxluser/cf8f967c9ec8167e6fed

I tried to keep it minimal. Read the comments and change things to your
liking. Again, that conf file applies to the SERVER, which should be
running a standard version of dnsmasq, not the one that comes with
NetworkManager.


To address the other problem, NetworkManager has taken control of your
/etc/resolv.conf file and will pretty much overwrite it whenever it wants
(usually during DHCP renewals). There are ways to work around this, but
it's going to start getting complicated. The easiest thing to do would be
to turn off network-manager and configure your interfaces via
/etc/network/interfaces file instead. Again, this is for the server only.
For other machines (clients) on your network, network-manager would
probably work just fine. Despite network-manager's insistence that it can
be used for servers, there are still issues with that idea (namely, you'd
have to do away with all the tried-and-true network configuration files and
tools that most use on servers).

On Wed, Apr 15, 2015 at 9:15 AM, Thiago Farina  wrote:

> On Tue, Apr 14, 2015 at 11:38 PM, Linux Luser 
> wrote:
> > I'm not sure if NetworkManager's version is better or worse for your
> case.
> > My understanding was that it is specifically configured to provide DNS
> > services to the localhost only. I think you should install the regular
> > dnsmasq for your distro if you are using it as a core service for your
> whole
> > network.
> >
> > On Debian-based systems, for example:
> >
> > $ sudo apt-get install dnsmasq
> >
> After doing this, my /etc/resolv.conf contains only 127.0.0.1.
>
> I did try updating it by running the following command lines:
>
> $ sudo dpkg-reconfigure resolvconf
>
> And
>
> $ sudo resolvconf -u
>
> And nothing were able to pull the nameservers from my router now. :/
>
> I had to manually edit it in order to get back access to internet.
>
> Why is that? What updates resolv.conf from my router's config?
>
> --
> Thiago Farina
>



-- 
daV.e

"The reasonable man adapts himself to the conditions that surround him...
The unreasonable man adapts surrounding conditions to himself... All
progress depends on the unreasonable man." Bernard Shaw
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dns server

2015-04-15 Thread Thiago Farina
On Tue, Apr 14, 2015 at 11:38 PM, Linux Luser  wrote:
> I'm not sure if NetworkManager's version is better or worse for your case.
> My understanding was that it is specifically configured to provide DNS
> services to the localhost only. I think you should install the regular
> dnsmasq for your distro if you are using it as a core service for your whole
> network.
>
> On Debian-based systems, for example:
>
> $ sudo apt-get install dnsmasq
>
After doing this, my /etc/resolv.conf contains only 127.0.0.1.

I did try updating it by running the following command lines:

$ sudo dpkg-reconfigure resolvconf

And

$ sudo resolvconf -u

And nothing were able to pull the nameservers from my router now. :/

I had to manually edit it in order to get back access to internet.

Why is that? What updates resolv.conf from my router's config?

-- 
Thiago Farina

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dns server

2015-04-15 Thread Chris Green
On Tue, Apr 14, 2015 at 11:15:45PM -0300, Thiago Farina wrote:
> On Tue, Apr 14, 2015 at 10:56 PM, Linux Luser  wrote:
> > Are you running dnsmasq through NetworkManager on the server or the client?
> Yes, I'm running it through NetworkManager on the server. :/
> 
> I have this in my NetworkManager.conf:
> 
> $ cat /etc/NetworkManager/NetworkManager.conf
> [main]
> plugins=ifupdown,keyfile
> dns=dnsmasq
> 
> no-auto-default=84:2B:2B:7C:96:69,
> 
> [ifupdown]
> managed=false
> 
> Is it better to run it standalone? How can I change this?
> 
When I ran dnsmasq on an xubuntu machine on my home network I ran the
standalone version of dnsmasq, thinking back I can't quite remember
why but I did think it was better for some reason.

I think you have to turn off the NetworkManager running of dnsmasq by
commenting out the line dns=dnsmasq above.  You can then install the
full dnsmasq package and it will put a proper start-up script in
/etc/init.d.

It's still rather messy though and that's why I now have dnsmasq
running on a raspberrypi where it's *much* simpler to configure and
you can put the dns server IPs in /etc/resolv.conf etc.

-- 
Chris Green

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss