[Openswan Users] perl script; handing out /30 with dhcpd
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
> ip's from randomly generated /30 subnets. In case anybody is interested
> this, it can be found at http://126.96.36.199/projects/slash30dhcpd/ .
> note that for now it will probably only work in a stand-alone
> as I did not test it with other dhcpd configurations alongside it.
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.
v1.1 - Fixed a mayor bug; dhcpd was not restarted (doh!) when
install' was called, which effectively meant only 1 lease was given
and all other dhcprequests failed with a 'no lease available' in
- 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
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
- dhcpd now only listens on $adapter
v1.0 - initial release.
More information about the Users