I have problem with my firewall (tested on debian / ubuntu 8.04 lts) , running squid + dansguardian but very slow browsing… ;p
I testing Slackware and so far stable and very fast..
Thus is how i made my dhcp server run…
the dhcpd.conf
root@brickwall:~# pico /etc/dhcpd.conf
########################################################################################
# dhcpd.conf
#
# Configuration file for ISC dhcpd (see ‘man dhcpd.conf’)
#aku tukar lease 86400; # 24 hours 172800; # 48 hours
ddns-update-style none;
authoritative;
default-lease-time 172800; # lease i have change to 48 houres
max-lease-time 604800; # lease for 7 days
option domain-name-servers 202.188.0.133, 8.8.8.8;
subnet 192.168.0.0 netmask 255.255.0.0
{
range 192.168.0.50 192.168.0.250;
option subnet-mask 255.255.0.0;
option broadcast-address 192.168.0.255;
option domain-name “pkink.gov.my”;
option routers 192.168.0.1;
}
#if you wanna fixed ip on mac address use this
host HP1 {
option host-name “printers.pkink.gov.my”;
hardware ethernet 00:XX:XX:XX:XX:XX;
fixed-address 192.168.1.XX;
}
########################################################################################
and final step the create rc.dhcpd
root@brickwall:~# pico /etc/rc.d/rc.dhcpd
########################################################################################
#!/bin/sh
#
# /etc/rc.d/rc.dhcpd
#
# Start/stop/restart the DHCP daemon.
#
# To make dhcpd start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.dhcpd
#
#############################################
CONFIGFILE=”/etc/dhcpd.conf”
LEASEFILE=”/var/state/dhcp/dhcpd.leases”
INTERFACES=”eth1″
OPTIONS=”-q”
#############################################
dhcpd_start() {
if [ -x /usr/sbin/dhcpd -a -r $CONFIGFILE ]; then
echo “Starting DHCPD…”
/usr/sbin/dhcpd -cf $CONFIGFILE -lf $LEASEFILE $OPTIONS $INTERFACES
# /usr/sbin/dhcpd -q $INTERFACES
fi
}
dhcpd_stop() {
killall dhcpd
}
dhcpd_restart() {
dhcpd_stop
sleep 2
dhcpd_start
}
case “$1” in
‘start’)
dhcpd_start
;;
‘stop’)
dhcpd_stop
;;
‘restart’)
dhcpd_restart
;;
*)
# Default is “start”, for backwards compatibility with previous
# Slackware versions. This may change to a ‘usage’ error someday.
dhcpd_start
esac
########################################################################################