Re: [Dnsmasq-discuss] Pulling DHCP leases from an external script?
Non-authoritative summary: Data goes from the dnsmasq server, to an dnsmasq helper process with limited privileges, to the script. No data comes back from the script, except during the startup phase. This is a security feature. On Wed, Oct 3, 2012 at 2:14 PM, Brian Rak b...@gameservers.com 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.ukDnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.**uk/mailman/listinfo/dnsmasq-**discusshttp://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
[Dnsmasq-discuss] Pulling DHCP leases from an external script?
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
Re: [Dnsmasq-discuss] Pulling DHCP leases from an external script?
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=15203444trk=tab_pro http://www.facebook.com/jay.imerman On Wed, Oct 3, 2012 at 3:14 PM, Brian Rak b...@gameservers.com 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.ukDnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.**uk/mailman/listinfo/dnsmasq-**discusshttp://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?
I'm trying to assign addresses via DHCP for a number of different networks (using ip-helper and option 82 on the switches). It's going to be tough for me to come up with a predefined list of what leases belong to what port, but it's definitely something I should be able to figure out when the lease is coming in. There's also the fact that the config file would end up being quite large if I pregenerate it for every possible combination. On 10/3/2012 3:47 PM, Jay Imerman wrote: 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=15203444trk=tab_pro http://www.facebook.com/jay.imerman On Wed, Oct 3, 2012 at 3:14 PM, Brian Rak b...@gameservers.com mailto:b...@gameservers.com 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 mailto: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