Re: [Dnsmasq-discuss] What's the easiest way to add some names to default dnsmasq in debian/ubuntu?

2017-03-07 Thread Chris Green
On Mon, Mar 06, 2017 at 04:49:13AM -0500, Petr Mensik wrote:
> Hi Chris,
>
> I think you create some file, for exaqmple 
> /etc/NetworkManager/dnsmasq.d/hosts.conf,
> containing addn-hosts=/etc/hosts.dnsmasq.
> Then you would have to create hosts.dnsmasq with hosts(5) format.  Place odin 
> there.
>
> 1.2.3.4   odin
>
OK.


> You could use some hook to NetworkManager to use create special file only
> for selected network. But I never did something like that, I cannot help
> you with that.
>
Yes, rather too much work for such a trivial requirement really.


> But I think you should try to ask LAN administrator to configure DNS and
> DHCP so that you do not have to invent something yourself.
> Maybe there is a name already that you do not know about.
>
Unfortunately (or not?) I am the LAN administrator, the LAN is
whatever my laptop happens to be connected to at the time. It's most
often my home LAN (where I have a 'proper' dnsmasq running on another
system) or on my boat where a router provides DHCP.

However the dnsmasq in question is the one that gets run by the
Network Manager process on the laptop itself.  This 'very local'
dnsmasq is now standard on all Ubuntu Linux systems (and probably on
other distributions).

-- 
Chris Green

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


Re: [Dnsmasq-discuss] What's the easiest way to add some names to default dnsmasq in debian/ubuntu?

2017-03-06 Thread Petr Mensik
Hi Chris,

I think you create some file, for exaqmple 
/etc/NetworkManager/dnsmasq.d/hosts.conf, containing 
addn-hosts=/etc/hosts.dnsmasq.
Then you would have to create hosts.dnsmasq with hosts(5) format. Place odin 
there.

1.2.3.4   odin

You could use some hook to NetworkManager to use create special file only for 
selected network. But I never did something like that, I cannot help you with 
that.

But I think you should try to ask LAN administrator to configure DNS and DHCP 
so that you do not have to invent something yourself.
Maybe there is a name already that you do not know about.

Cheers,
Petr
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemen...@redhat.com  PGP: 65C6C973

- Original Message -
From: "Chris Green" 
To: dnsmasq-discuss@lists.thekelleys.org.uk
Sent: Friday, March 3, 2017 4:49:59 PM
Subject: [Dnsmasq-discuss] What's the easiest way to add some names to default 
dnsmasq in debian/ubuntu?

In Ubuntu systems (and maybe debian, not sure about this) dnsmasq is
run my NetworkManager to provide local DNS, the process shows up as:-

nobody1470  1022  0 15:01 ?00:00:00 /usr/sbin/dnsmasq 
--no-resolv --keep-in-foreground --no-hosts --bind-interfaces 
--pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 
--cache-size=0 --conf-file=/dev/null --proxy-dnssec 
--enable-dbus=org.freedesktop.NetworkManager.dnsmasq 
--conf-dir=/etc/NetworkManager/dnsmasq.d

Is there any easy way to get it to recognise some local names?  I have
(in particular) a BeagleBone black on one LAN I use and it would be
really handy to be able to call it 'odin' rather than have to find its
IP address every time.

DHCP for the LAN is provided by a router which, sadly, doesn't seem to
know about local names.

Ideally 'odin' should only be present when it actually *is* present
(i.e. when I'm connected to the specific LAN where it exists), but
this isn't absolutely necessary.
 
-- 
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