Hector M Banda wrote:
>
> Hi all, I just got subscribed to this list and already have a question for
> you.
>
> What I need is to know all the steps to install and configure DHCP server on
> RH 6.0.?
>
> What I have is a server running as a firewall with 2 NIC's and I'd like to
> know how to configure DHCP so I dont have to manually put the IP's on every
> single client of my private network.
>
> Thanks.
>
> ============================================
> Hector M Banda
> Senior Computer Programmer
> Information Systems Department
> Imperial Valley College
> Imperial Ca, 92251
> Phone: 760.355.6105
> Fax : 760.355.6173
> ============================================
>
> --
> To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.
Setting up the dhcp server is actually not too bad... here's mine. All
dhcp's computers use my linux box as a DNS and a gateway.
/etc/dhcpd.conf:
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.1.3 192.168.1.20;
option subnet-mask 255.255.255.0 ;
option broadcast-address 192.168.1.255 ;
option routers 192.168.1.1;
option domain-name-servers ip_dns1, ip_dns2, ip_gateway; #Fill in ip
addresses of nameservers and gateway
option domain-name "yourdomain.whatever";
}
Once I had the second NIC configured I had to modify
/etc/rc.d/init.d/dhcpd to listen on eth1. Look for
daemon /usr/sbin/dhcpd
and add eth1 to the line to read:
daemon /usr/sbin/dhcpd eth1
This way, when dhcpd starts in /etc/rc.d/rc3.d (or rc5.d if it suits
your needs) it listens on eth1. When dhcpd first starts it'll probably
complain about a dhcpd.leases file somewhere. Just do a
touch {filename}
and it'll be ok.
If you want to use your linux box to route packets, be sure to have
named configured and running. Check out the HOWTO's on IPCHAINS also.
I use IP chains to subnet and route packets to eth1 with the following
lines in my /etc/rc.d/rc.local:
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -P forward DENYecho "Subnet to 192.168.10.xxx"
ipchains -A forward -s 192.168.10.0/24 -d 0/0 -j MASQ
Have your /etc/sysconfig/network look like this:
NETWORKING=yes
FORWARD_IPV4="yes"
HOSTNAME="yourdomain.com"
GATEWAY="xx.yy.zz.kk" # <- fill in IP address of your gateway
GATEWAYDEV="eth0" # <- my case is eth0 is connected to the
cablemodem
Try all this first and see how far you get.
- Scott
--
Never do windows again with
__
/ / __ _ _ _ _ __ __
/ /__ / / / \// //_// \ \/ /
/____/ /_/ /_/\/ /___/ /_/\_\.
No streaking, haze, or glaze.
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.