LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   LAN setup (https://www.linuxquestions.org/questions/linux-networking-3/lan-setup-86663/)

Melo 08-28-2003 12:57 PM

LAN setup
 
:confused:
Ok......I have three machines here in my home office. One of them is dual boot - Windows98 SE or Mandrake 9.0. The other two are Win98 SE machines. They all have operating NIC cards - two in the Linux machine with Cat 5 cabeling connecting them to a 5 port switch. My goal is to use the Linux box as a router/gateway for the other two machines.

I set up the Internet Connections in Mandrake Control Panel, eth0 is my WEB device with a DHCP of 12.231.10.100
(Broadband) The system "see's" the ISP and lists not only the IP above but the ISP DNS and ISP default gateway.
My modem is connected to the switch and of course the other machines are connected to the switch as well. I also set up the 'connection sharing' in Mandrake, too.

The second NIC in the Linux box (eth1) is configured (static) as follows: IP is 192.168.1.1 with a gateway of the same? and mask of 255.255.255.0?
This didn't seem correct to me but 'the system' seemed to want that.

One of the other machines I have configured as follows:
IP is 192.168.1.2, mask of 255.255.255.0 - gateway of 192.168.1.1 but I cannot make it connect to the Internet unless I connect the modem directly to the switch and tell this machine to get it's IP from the ISP- in effect negating the IP number that I inserted.

I edited /etc/sysctl.conf so that - net.IPv4.IP-forward=1 instead of '0'. Thats the only system software change that I made.

I'm sure I have eth1 and the 'other' machine screwed up but I cannot figure out how.

Help !!!!!!!!!!!

Thanks....

Dr.Lun 08-28-2003 03:02 PM

Win98[1]---------------| |
Win98[2]---------------|switch|-------------------[eth1]Linux[eth0]---------ISP


Point your Win comps to Linux box as default gateway. On Linux box you need to configure routing:

I have the same situation at home (only using ppp link (modem)). Here is setup for routing: (as root)

echo 1 > /proc/sys/net/ipv4/ip_forward
/usr/sbin/iptables -F
/usr/sbin/iptables -P FORWARD ACCEPT
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

Win98 1 is 192.168.1.2; 255.255.255.0 and 192.168.1.1 as gateway
Win98 2 is 192.168.1.3; 255.255.255.0 and 192.168.1.1 as gateway

Linux is 192.168.1.1 on eth0 and gets IP from ISP.

Mathieu 08-28-2003 03:08 PM

This thread can help you setup Internet Connection sharing.
http://www.linuxquestions.org/questi...threadid=82005

Melo 08-29-2003 12:27 PM

Thanks to both respondents.

Dr. Lum..........where do the lines of code you show - go?
What directory and file name? Do I create a new file? and if so does it need a particular name and in which directory does it go?
Or do I modify an existing file?

Thanks again

ganninu 09-04-2003 05:38 PM

I have a similar problem but the scenario is a bit different - I have an alcatel speed touch PRO adsl modem, which is also the gateway to the internet (10.0.0.138). I have 3 linuces, 2 Windows XP and 1 Windows 98SE. With the linuces and Windows XP I can easily share the internet - just setup a different local ip address for each, and the gateway which is the modem's ip address (10.0.0.138). But when i come to Windows 98 SE, I get stuck. Any ideas how to enable a windows 98 SE box share the internet as well? (I tried the internet sharing wizard as well... but it really sucks)

dubman 09-04-2003 05:52 PM

melo...they dont "go" anywhere, just type them at the command line just as you see them written

#echo 1 > /proc/sys/net/ipv4/ip_forward
#/usr/sbin/iptables -F
#/usr/sbin/iptables -P FORWARD ACCEPT
#/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

each line is a different command

--dubman


All times are GMT -5. The time now is 04:42 PM.