yum install dhcp
2. edit /etc/dhcpd.conf
option domain-name-servers x.x.x.x, x.x.x.x #domain name server of ISP
option routers x.x.x.x #ip address of this dhcp server
3.設定iptables (注意:會把iptables設定改掉)
iptables-save > iptables_original
iptables -F (清除規則)
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
service iptables save
4. edit /etc/sysctl.conf
net.ipv4.ip_forward = 1
apply /etc/sysctl.conf
# sysctl -p /etc/sysctl.conf
4. restart dhcpd service
#service dhcpd restart
http://www.centos.org/docs/5/
沒有留言:
張貼留言