Re: [Dnsmasq-discuss] Different dns config based on network address

2012-10-10 Thread Jay Imerman
Cyro, I think what you want to use is tags. If you read thru the conf
file there are numerous references to them.



- Jay
Sent from my iPhone

On Oct 10, 2012, at 9:04, Cyro Wicks  wrote:

> Hello all,
>
> I have a firewall and dns server for my entire network, and what i would like 
> to do is to have dnsmasq to read /etc/hosts_net1 or /etc/hosts_net2 based on 
> the network address coming from net1 or net2.
>
> I am trying to implement an internet filtering based on dnsmasq, but i would 
> like to have net1 users and net2 users with different dns block rules defined 
> on /etc/hosts_net1 and /etc/hosts_net2 files!
>
> Is it possible with dnsmasq?
>
> Thank you very much for any help.
>
> Cyro
> ___
> 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-10 Thread Jay Imerman
Did a search on VirtualBox command line - something like
VirtualBoxManage -startvm "machine name"



- Jay
Sent from my iPhone

On Oct 10, 2012, at 4:31, Chris Green  wrote:

> On Tue, Oct 09, 2012 at 05:14:11PM -0400, Jay Imerman wrote:
>> 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.
> That's exactly what I was wondering about, thanks for confirming that it
> works, I may well try it out.  How do you get the VirtualBox machine to
> run at startup?
>
> --
> 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  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


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  wrote:

> On Mon, Oct 08, 2012 at 06:49:38PM -0400, Jay Imerman wrote:
>> On Oct 8, 2012, at 14:04, Chris Green  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-08 Thread Jay Imerman
Did you edit /etc/NetworkManager/NetworkManager.conf?  The line should
say dns=dnsmasq




- Jay
Sent from my iPhone

On Oct 8, 2012, at 14:04, Chris Green  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.
>
> --
> 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] System tries to get its address by DHCP before dnsmasq starts up - how to stop it?

2012-10-05 Thread Jay Imerman
There is a NetworkManager.conf file, in there the line dns= should
Jane dnsmasq as the setting. I haven't noticed any delays in my setup,
same thing: 12.04 with static IP v4 settings, it is nice and snappy.



- Jay
Sent from my iPhone

On Oct 4, 2012, at 11:04, Dan Williams  wrote:

> On Thu, 2012-10-04 at 12:20 +0100, Chris Green wrote:
>> On Thu, Oct 04, 2012 at 10:23:33AM +0100, Chris Green wrote:
>>> I have a little server system running dnsmasq version 2.59 under Ubuntu
>>> 12.04 (I have just upgraded it from Ubuntu 10.04).
>>>
>>> While booting it tries to get its network configuration (using DHCP
>>> presumably) from the LAN, since *it's* the DHCP server this doesn't work
>>> but it wastes a lot of time waiting for things to time out and produces
>>> various error messages on the way.
>>>
>>> How do I configure the system so that it doesn't do this?
>> Further to this the delay is cause by /etc/init/failsafe.conf, even if I
>> have static IP correctly configured in /etc/network/interfaces the silly
>> init sequence still does all the waits in /etc/init/failsafe.conf
>> waiting for DHCP.
>>
>> Google searches just produce the standard way to set up static IP but
>> no workaround for the delays.
>
> Is the machine running NetworkManager?  If so it could be a
> misconfiguration issue or an Upstart dependency issue.
>
> Dan
>
>
>
> ___
> 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] Pulling DHCP leases from an external script?

2012-10-03 Thread Jay Imerman
I'm not 100% certain, but the way I read the man page, the script is
triggered after the dnsmasq event occurs, so you can pass some custom
behavior to a script after dnsmasq has managed the lease.  However, it
sounds like you want to customize dnsmasq behavior and insert your own
algorithm for allocating IP addresses?  Just out of curiosity, why?  You
can specify quite a complex set of allocation rules using tags and more,
why would you need to have anything other than that?
_______
Jay Imerman
T (248) 230-4373  |  F (952) 255-2056
4067 Highview Court
Waterford, MI  48329-4712

<http://twitter.com/#%21/jimerman>
<http://www.linkedin.com/profile/view?id=15203444&trk=tab_pro>
<http://www.facebook.com/jay.imerman>



On Wed, Oct 3, 2012 at 3:14 PM, Brian Rak  wrote:

> I'm trying to set up a DHCP server so that on any request for a new lease
> I can execute a script and have the script return an IP address (and other
> information).
>
> Is this something that is currently possible with dnsmasq?  From reading
> the man page, I can't tell if I will get this behaviour with --dhcp-script
> --leasefile-ro.
>
> Basically, it would be impossible for me to specify all the possible DHCP
> leases at startup, but when a lease request is received I would be able to
> determine what IP to assign.
>
> __**_
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.**thekelleys.org.uk
> http://lists.thekelleys.org.**uk/mailman/listinfo/dnsmasq-**discuss<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