Machines on local area network can't access internet

Machines on local area network can't access internet

Post by Ga » Sat, 27 Apr 2002 23:26:11



I have eth0 and eth1 setup as the following.


DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no


DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.1
GATEWAY=24.98.98.148
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
TYPE=Ethernet
USERCTL=no
PEERDNS=no

Windows machine is configured like:

IP: 192.168.1.2
Netmask: 255.255.255.0
Gateway: 192.168.1.1

eth0 has internet access with no problems. I can ping 192.168.1.1 and
telnet to it from the windows machine without any problems. However, I
cannot access the internet from my windows machine. Any ideas why??

Thanks.

Gab

 
 
 

Machines on local area network can't access internet

Post by Stefan Wallentowit » Sat, 27 Apr 2002 23:50:25


Hi Gab!

You still need to configure a few more things. For example you first need to
activate Dynamic_IP and IP_Forwarding in your system. Then you need
masquerading and routing. Are you running SuSE?
I use SuSE 7.3.
Set DYNAMIC_IP and IP_FORWARDING to "yes".
Then activate masquerading and routing. You can use IPTABLES for
masquerading the IPs.
Run this command:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Search the web for further information.

cu
Stefan



> I have eth0 and eth1 setup as the following.


> DEVICE=eth0
> BOOTPROTO=dhcp
> ONBOOT=yes
> TYPE=Ethernet
> USERCTL=no
> PEERDNS=no


> DEVICE=eth1
> BOOTPROTO=static
> ONBOOT=yes
> IPADDR=192.168.1.1
> GATEWAY=24.98.98.148
> NETMASK=255.255.255.0
> NETWORK=192.168.1.0
> BROADCAST=192.168.1.255
> TYPE=Ethernet
> USERCTL=no
> PEERDNS=no

> Windows machine is configured like:

> IP: 192.168.1.2
> Netmask: 255.255.255.0
> Gateway: 192.168.1.1

> eth0 has internet access with no problems. I can ping 192.168.1.1 and
> telnet to it from the windows machine without any problems. However, I
> cannot access the internet from my windows machine. Any ideas why??

> Thanks.

> Gab


 
 
 

Machines on local area network can't access internet

Post by Ga » Mon, 29 Apr 2002 02:35:45


Stefan,

Thanks for the help. I finally turned on ip_forward but I'm still not
able to get internet access from the machine on my local area network.

Here is the output of the netstat -rn command:

Kernel IP routing table
Destination???? Gateway???????? Genmask???????? Flags?? MSS Window?
irtt Iface
192.168.1.0???? 0.0.0.0???????? 255.255.255.0?? U??????? 40 0?????????
0 eth1
24.98.96.0????? 0.0.0.0???????? 255.255.252.0?? U??????? 40 0?????????
0 eth0
127.0.0.0?????? 0.0.0.0???????? 255.0.0.0?????? U??????? 40 0?????????
0 lo
0.0.0.0???????? 24.98.96.1????? 0.0.0.0???????? UG?????? 40 0?????????
0 eth0

Does that look right? The default gateway for eth1 is 24.98.98.148 but
I don't see that in the routing table. Any ideas?  I have RedHat 7.2

Thanks.

Gab


> Hi Gab!

> You still need to configure a few more things. For example you first need to
> activate Dynamic_IP and IP_Forwarding in your system. Then you need
> masquerading and routing. Are you running SuSE?
> I use SuSE 7.3.
> Set DYNAMIC_IP and IP_FORWARDING to "yes".
> Then activate masquerading and routing. You can use IPTABLES for
> masquerading the IPs.
> Run this command:
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

> Search the web for further information.

> cu
> Stefan



> > I have eth0 and eth1 setup as the following.


> > DEVICE=eth0
> > BOOTPROTO=dhcp
> > ONBOOT=yes
> > TYPE=Ethernet
> > USERCTL=no
> > PEERDNS=no


> > DEVICE=eth1
> > BOOTPROTO=static
> > ONBOOT=yes
> > IPADDR=192.168.1.1
> > GATEWAY=24.98.98.148
> > NETMASK=255.255.255.0
> > NETWORK=192.168.1.0
> > BROADCAST=192.168.1.255
> > TYPE=Ethernet
> > USERCTL=no
> > PEERDNS=no

> > Windows machine is configured like:

> > IP: 192.168.1.2
> > Netmask: 255.255.255.0
> > Gateway: 192.168.1.1

> > eth0 has internet access with no problems. I can ping 192.168.1.1 and
> > telnet to it from the windows machine without any problems. However, I
> > cannot access the internet from my windows machine. Any ideas why??

> > Thanks.

> > Gab