All,
I have a fix to the script that works on R2. Everything works just fine and this is the function from my easy-creds. The main concern is the dhcp section...I've posted it below.
Code:
echo "Creating a dhcpd.conf to assign addresses to clients that connect to us"
#create a backup just in case...
cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_bckup
#empty the file to start clean
cat /dev/null > /etc/dhcp3/dhcpd.conf
echo "default-lease-time 600;" > /etc/dhcp3/dhcpd.conf
echo "max-lease-time 720;" >> /etc/dhcp3/dhcpd.conf
echo "ddns-update-style none;" >> /etc/dhcp3/dhcpd.conf
echo "authoritative;" >> /etc/dhcp3/dhcpd.conf
echo "log-facility local7;" >> /etc/dhcp3/dhcpd.conf
echo "subnet 10.0.0.0 netmask 255.255.255.0 {" >> /etc/dhcp3/dhcpd.conf
echo "range 10.0.0.100 10.0.0.254;" >> /etc/dhcp3/dhcpd.conf
echo "option routers 10.0.0.1;" >> /etc/dhcp3/dhcpd.conf
echo "option subnet-mask 255.255.255.0;" >> /etc/dhcp3/dhcpd.conf
echo "option domain-name-servers 8.8.8.8;" >> /etc/dhcp3/dhcpd.conf
echo "option broadcast-address 10.0.0.255;" >> /etc/dhcp3/dhcpd.conf
echo "allow unknown-clients;" >> /etc/dhcp3/dhcpd.conf
echo "}" >> /etc/dhcp3/dhcpd.conf
#
echo 'DHCP server starting on our airbase-ng interface (at0)'
echo > /var/lib/dhcp3/dhcpd.leases
mkdir -p /var/run/dhcp3-server
chown -R dhcpd:dhcpd /var/run/dhcp3-server
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
dhcpd3 -q -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0 &
sleep 3
entire easy-creds script:
easy-creds - Browse Files at SourceForge.net