Re: [Dnsmasq-discuss] How to add local configuration to Network Manager initiated dnsmasq in Ubuntu 12.04

2012-10-09 Thread Chris Green
On Mon, Oct 08, 2012 at 06:49:38PM -0400, Jay Imerman wrote:
 On Oct 8, 2012, at 14:04, Chris Green c...@isbd.net wrote:
 
  I have run dnsmasq with local configuration for quite a while now to
  provide local DNS services on my home LAN.
 
  I am now upgrading my machines to [xl]ubuntu 12.04 and in this version
  dnsmasq is run automatically by Network Manager.  A default installation
  just puts the following in resolv.conf:-
 
 # Dynamic resolv.conf(5) file for glibc resolver(3) generated by 
  resolvconf(8)
 # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
 nameserver 127.0.0.1
 
  How can I customize the dnsmasq configuration in a way that won't get
  broken by future upgrades?  The NM dnsmasq runs as follows:-
 
 chris$ ps -ef | grep dnsmasq
 nobody1341  1090  0 17:40 ?00:00:00 /usr/sbin/dnsmasq 
  --no-resolv --keep-in-foreground --no-hosts --bind-interfaces 
  --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid 
  --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf 
  --cache-size=0 --proxy-dnssec
 
  Since the config file is specified as 
  --conf-file=/var/run/nm-dns-dnsmasq.conf
  it's difficult to do anything that won't get lost at upgrade time.
 
 Did you edit /etc/NetworkManager/NetworkManager.conf?  The line should
 say dns=dnsmasq
 

*I* didn't edit that line, the upgrade to Ubuntu 12.04 (well xubuntu
actually but that's of no import) did it.

What I want to know is what is the 'right' way to add local
configuration to the dnsmasq that Ubuntu 12.04 has added to my system. 
I didn't used to run dnsmasq on this system at all, I run it on a
separate server system.  However, now that dnsmasq is being run for me
on my desktop it seems to make sense to me to use it there rather than
trying to maintain a separate configuration elsewhere.

-- 
Chris Green

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


Re: [Dnsmasq-discuss] How to add local configuration to Network Manager initiated dnsmasq in Ubuntu 12.04

2012-10-09 Thread Dan Williams
On Tue, 2012-10-09 at 14:04 +0100, Chris Green wrote:
 On Tue, Oct 09, 2012 at 12:25:41PM +0100, Niall Litchfield wrote:
 Chris
 Did you come across Stephane Graber's website and article
 at [1]http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ (not sure 
  if
 
 Yes, I've found and read that.  It describes how the new NM driven
 dnsmasq works but give no clue how to customise/configure local DNS.
 
 
 Stephane is on this list). If what you are after is just nameserver
 changes he addresses that. Now I'll admit to disabling the network 
  manager
 install of dnsmasq and installing my own installation instead for 2
 reasons 
 
 I don't want nameserver changes, I want a nameserver that works for
 local (LAN) systems.

Back in July we added the ability to drop local dnsmasq config
into /etc/NetworkManager/dnsmasq.d which is part of NM 0.9.6, released
in early August.  I believe this fixes your problem.

The reason we cannot use the normal dnsmasq configuration is that by
default, that gets read, but there's a *lot* of stuff that uses dnsmasq
these days (libvirt, manual installs, NM, etc) and NM's use of dnsmasq
is quite different from these others, and thus the configuration
directives in the default config file simply don't apply to how NM uses
dnsmasq.

I think your best bet is to either:

1) get Ubuntu to backport the patch (git commit
ac152ece0206b4cde28acf78abb21518e67513e1) to 12.04

2) replace dnsmasq with a shellscript that checks the arguments it's
being called with, munges the arguments, and then calls the real dnsmasq

Dan



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


Re: [Dnsmasq-discuss] Repeated assignment, ignored dhcp-host, and failed DNS lookup

2012-10-09 Thread Simon Kelley

On 09/10/12 12:22, Lovelady, Dennis E. wrote:

How would I know if a rogue DHCP server has appeared on the net?


I don't think it's likely, at the moment. My guess is that the DHCP
server is at the same IP address on both the networks, and when the
machine came back up, it sent the DHCPINFORM to the DHCP server
address, then took the response as confirmation that the lease was
still valid. This is a bit of a gray area, but the client isn't
strictly allowed to do that: it should send a DHCPREQUEST.
(strictly, it should entry INIT-REBOOT state)


You should give yourself more credit, Simon!  :)

Turns out, my ISP had replaced the modem/router while I was away
(this is in an apartment, and the leasing office let the tech in
while I was at my real home, and I had complained to the ISP about
intermittent connection).  Of course, that device had its own DHCP by
default.  Prompted by your query, I found and resolved the issue
quickly by disabling that DHCP and using

ifconfig /release; service network restart

(or equivalent) on all devices.

Thanks so much for your guidance; this was one that didn't make any
sense to me at all, until my eyes were opened again.


Mystery solved. And no need to fix dnsmasq or complain to Microsoft :-)
Glad it's sorted.


Cheers,

Simon.


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


Re: [Dnsmasq-discuss] Trivial error in sample dnsmasq.conf file

2012-10-09 Thread Simon Kelley

On 08/10/12 22:39, brendle...@gmail.com wrote:

I believe the line:

  #dhcp-boot=net:red,pxelinux.red-net

should be

  #dhcp-boot=tag:red,pxelinux.red-net


And, since I have noticed someone has gone to the trouble of fixing
other minor typos:

  # Include a another lot of configuration options.

should be

  # Include another lot of configuration options.




Fixed. Many thanks.


Simon.

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


Re: [Dnsmasq-discuss] How to add local configuration to Network Manager initiated dnsmasq in Ubuntu 12.04

2012-10-09 Thread Jay Imerman
Strange. I installed 12.04 from scratch, and had to install dnsmasq
and change it in the NetworkManager. In fact I finally fixed an issue
with the Ubuntu machine itself not resolving names outside itself (ie
Internet DNS) by changing the line to dns=dnsmasq,dns

Thus the default on a new install was dns not dnsmasq. I will check
the workstation I upgraded to 12.04 later tonight.



- Jay
Sent from my iPhone

On Oct 9, 2012, at 4:39, Chris Green c...@isbd.net wrote:

 On Mon, Oct 08, 2012 at 06:49:38PM -0400, Jay Imerman wrote:
 On Oct 8, 2012, at 14:04, Chris Green c...@isbd.net wrote:

 I have run dnsmasq with local configuration for quite a while now to
 provide local DNS services on my home LAN.

 I am now upgrading my machines to [xl]ubuntu 12.04 and in this version
 dnsmasq is run automatically by Network Manager.  A default installation
 just puts the following in resolv.conf:-

   # Dynamic resolv.conf(5) file for glibc resolver(3) generated by 
 resolvconf(8)
   # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
   nameserver 127.0.0.1

 How can I customize the dnsmasq configuration in a way that won't get
 broken by future upgrades?  The NM dnsmasq runs as follows:-

   chris$ ps -ef | grep dnsmasq
   nobody1341  1090  0 17:40 ?00:00:00 /usr/sbin/dnsmasq 
 --no-resolv --keep-in-foreground --no-hosts --bind-interfaces 
 --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid 
 --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf 
 --cache-size=0 --proxy-dnssec

 Since the config file is specified as 
 --conf-file=/var/run/nm-dns-dnsmasq.conf
 it's difficult to do anything that won't get lost at upgrade time.
 Did you edit /etc/NetworkManager/NetworkManager.conf?  The line should
 say dns=dnsmasq

 *I* didn't edit that line, the upgrade to Ubuntu 12.04 (well xubuntu
 actually but that's of no import) did it.

 What I want to know is what is the 'right' way to add local
 configuration to the dnsmasq that Ubuntu 12.04 has added to my system.
 I didn't used to run dnsmasq on this system at all, I run it on a
 separate server system.  However, now that dnsmasq is being run for me
 on my desktop it seems to make sense to me to use it there rather than
 trying to maintain a separate configuration elsewhere.

 --
 Chris Green

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

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


Re: [Dnsmasq-discuss] How to add local configuration to Network Manager initiated dnsmasq in Ubuntu 12.04

2012-10-09 Thread Jay Imerman
I think I read your reply as you want a dhcp and name server for your
LAN, right? That is what I have set up right now. A 12.04 desktop VM
running in VirtualBox, the NIC is bridged to the host adapter. It
works great but I had to fiddle a bit to get the dnsmasq I downloaded
with apt-get to run.



- Jay
Sent from my iPhone

On Oct 9, 2012, at 9:06, Chris Green c...@isbd.net wrote:

 On Tue, Oct 09, 2012 at 12:25:41PM +0100, Niall Litchfield wrote:
   Chris
   Did you come across Stephane Graber's website and article
   at [1]http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ (not sure if

 Yes, I've found and read that.  It describes how the new NM driven
 dnsmasq works but give no clue how to customise/configure local DNS.


   Stephane is on this list). If what you are after is just nameserver
   changes he addresses that. Now I'll admit to disabling the network manager
   install of dnsmasq and installing my own installation instead for 2
   reasons

 I don't want nameserver changes, I want a nameserver that works for
 local (LAN) systems.

 --
 Chris Green

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

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