Linux box sharing RH 8.0 + WinXp
Hi,
I've been turn around the same problem a couple of day. I want to set up my redhat 8.0 linux box as a Gateway router.
I can't access the net while i'm and my Xp box, but I can access it when I'm in my linux box. I think it's iptable that i must configure.. I have two NICs: Is a linksys and the other one is the D-Link. These device are ok. eth0 is the NIC i use for ADSL modem connection and eth1 is set for my local network
At the beginning I set these config files
/etc/sysconfig/network-scritps/ifcfg-eth0:
DEVICE=eth0
ONBOOT=yes
/etc/sysconfig/network-scritps/ifcfg-eth1:
DEVICE=eth1
IPADDR=192.168.1.1 #it's my gateway address
ONBOOT=yes
Next I edit the file /etc/systl.conf: and enables
net.ipv4.forwarding = 1
net.ipv4.ip_always_defrag = 1
net.ipv4.conf.default.rp_filter = 1
I set up the /etc/dhcpd.conf file:
ddns-update-style interim;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.60
default-lease-time 86400;
max-lease-time 86400;
option routers 192.168.1.1;
option ip-forwarding off;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
}
And add in the same file
option domain-name-server 192.168.1.1
I then edit the /etc/rc.d/init.d/dhcpd file and add:
daemon /usr/sbin/dhcpd eth1
wHEN I reboot eth0 eth1 and PPPo are Up... I tried to configure Iptable to masquerading my internal ip address..
I did as root:
iptables -F
iptables -F -t nat
then
iptables -P FORWARD ACCEPT
I saved it with service iptables save then
service iptables restart.
I configure my Xp box to with DHCP and default gateway as 192.168.1.1, then I reboot it...
Now I can't even ping my Xp Box cause I flush all the rules.. What An Idiot!!! i'M a newbie... Can u check if my configuration seems good? What iptables command should I do for getting back communication between my Box and to accesse the net, while I'm on Xp?? Thanks a lot guys cya
Metheavy
Last edited by Metheavvy; 10-29-2003 at 09:41 PM.
|