July 2007
iwi202
Was the DHCP
server and it also checked mail for viruses and spam.
Now it is becoming old: it has one bad sector already.
The machine is out of service and I have a week left before my vacation: no time to buy new hardware or do serious migration of users.
I'm moving mailchecking and DHCP
to iwi2
.
Bring the machine up to date: apt-get update && apt-get dist-upgrade
Configure the IP number statically.
Modify /etc/network/interfaces
to contain a stanza:
#iface eth0 inet dhcp iface eth0 inet static address nnn.nnn.nnn.nnn netmask 255.255.255.0
Make sure it finds the nameserver when the NIC comes up.
It seems this thing runs BIND
already, it is its own nameserver:
search mydomain.com nameserver 127.0.0.1
install the DHCP daemon: apt-get install dhcp3-server
Enable the DHCP server by editing /etc/default/dhcp3-server
:
INTERFACES="eth0"
Set aside the original dhcpd config: cd /etc/dhcp3 && mv dhcpd.conf dhcpd.conf.dist
Copy the DHCP config from the old system, iwi202
:
cd /etc/dhcp3 && \
scp root@iwi202:/etc/dhcp3/dhcpd.conf ./ && \
scp -r root@iwi202:/etc/dhcp3/IWI-NET ./
Start the DHCP server: /etc/init.d/dhcp3-server restart
Copy /usr/local/bin/dhcprestart
from another host for convenience.
Put the DHCP daemon in the startup scripts: update-rc.d dhcp3-server defaults
And start the DHCP daemon: /etc/init.d/dhcp3-server restart
Remove the DHCP server from the startup scripts: update-rc.d -f dhcp3-server remove
And stop the DHCP daemon: /etc/init.d/dhcp3-server stop