Hello,
I have just setup NAT and DHCP , but can't connect to the internet with
client :
Get IP from dhcp server :
C:\>ipconfig
Windows 2000 IP Configuration
Ethernet adapter :
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 172.2.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.2.0.254
C:\>
My config file :
/etc/sysconfig/network-scripts/ifcfg-eth1 :
DEVICE=eth1
ONBOOT=yes
IPADDR=172.2.0.254
NETMASK=255.255.255.0
/etc/rc.d/rc.local :
echo '1' > /proc/sys/net/ipv4/ip_forward
modprobe ip_nat_ftp
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
iptables -t nat -A POSTROUTING -o eth1 -s 172.2.0.0/24 -j MASQUERADE
/etc/dhcpd.conf :
subnet 172.2.0.0 netmask 255.255.255.0 {
range 172.2.0.1 172.2.0.253;
default-lease-time 604800;
max-lease-time 604800;
option broadcast-address 172.2.0.255;
option routers 172.2.0.254;
option domain-name-servers 192.168.200.1;
}
Edit /etc/rc.d/init.d/dhcpd :
....
start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon /usr/sbin/dhcpd eth1 ${DHCPDARGS}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
return $RETVAL
}
...
touch /var/lib/dhcp/dhcpd.leases
/etc/rc.d/init.d/dhcpd start
PS : the system is Redhat 7.2, port eth0 is connected to the lease
line...
Thank for your help !
Edward.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list