[Openswan Users] perl script; handing out /30 with dhcpd

Arn Vollebregt arn.vollebregt at xs4all.nl
Wed Jan 9 05:41:45 EST 2008


> From: users-bounces at openswan.org [mailto:users-bounces at openswan.org] On
> Behalf Of Arn Vollebregt
> 
> I made a Perl script which dynamically configures dhcpd to only hand
> out
> ip's from randomly generated /30 subnets. In case anybody is interested
> in
> this, it can be found at http://82.92.8.139/projects/slash30dhcpd/ .
> Please
> note that for now it will probably only work in a stand-alone
> environment,
> as I did not test it with other dhcpd configurations alongside it.

Hi again,

I am not in the habit of spamming new releases on mailing lists, but since
v1.0 has some serious flaws (let's be frank; it didn't work), and my log
files indicate there was some interest in the script I'd like to sneak in
this announcement of v1.1. My apologies for releasing a version that did not
work well. Attached you will find the change log.

CHANGELOG
v1.1 - Fixed a mayor bug; dhcpd was not restarted (doh!) when
'slash30dhcpd.pl
       install' was called, which effectively meant only 1 lease was given
out
       and all other dhcprequests failed with a 'no lease available' in
syslog
     - checkRenew function now uses the dhcpd.leases file, which has to be
       specified via the variable below.
     - caller.pl install command now introduces a sleep(1), to make sure
dhcpd
       does not hand out a lease before we get to check dhcpd.leases.
     - likewise in the prepare() function in slash30dhcpd, which otherwise
       threw dhcpd in a loop since the lease was not handed out yet before
       it was restarted.
     - fixed mistake in virtualInterfaceDeinstall where eth0 was hardcoded
       instead of using $adapter.
     - added choice to use firewall rules (some people might prefer to just
       use rules on the interface without ip restrictions).
     - added a variable for the dns server(s) to use in 'option
       domain-name-servers'
     - dhcpd now only listens on $adapter
v1.0 - initial release.

Regards,

Arn Vollebregt




More information about the Users mailing list