Professional Documents
Culture Documents
Before you start, make sure you know the following things about your network
setup:
1. You ISP-assigned static IP address, if you have one.
2. The IP addresses of the DNS servers of your ISP.
Make sure that you have set up the IP address for the network card connected to
your internal network by issuing the following command as root:
Setting up DHCP
Log in as root, and edit the file /etc/dhcpd.conf to include the following:
default-lease-time 21600;
max-lease-time 43200;
}
Now start the DHCP server on the network card connected to the internal network
by issuing the command:
/usr/sbin/dhcpd eth1
To make sure DHCP starts up every time, add the line above to the end of
/etc/rc.d/rc.local.
You can test that DHCP is working by plugging a client into the network and setting
it to obtain an IP address automatically. If it gets an IP address in the range
10.10.0.2 to 10.10.0.254 as specified by the range directive, then it's working
correctly.
Setting up DNS
Next we'll set up DNS, which is responsible for translating numeric IP addresses
like 64.233.161.99 to more readable names like www.google.com. Setting up a
DNS server is generally considered a complex task, and rightly so, but for our
purposes, all you have to do is add a few lines to the /etc/named.conf file.
In your named.conf file, inside the opening section called options, insert:
forward first;
forwarders {
<Insert IP address of ISP's DNS server>;
};
MY ISP's DNS server is 202.78.167.25, so my configuration looks like this:
forward first;
forwarders {
202.78.167.25;
};
Start the DNS server by issuing the command service named start. To make sure it
starts every time, type the following command.