LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-28-2003, 01:57 PM   #1
Melo
LQ Newbie
 
Registered: May 2003
Location: Texas
Distribution: 8
Posts: 19

Rep: Reputation: 0
Question LAN setup



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....
 
Old 08-28-2003, 04:02 PM   #2
Dr.Lun
LQ Newbie
 
Registered: Apr 2003
Posts: 13

Rep: Reputation: 0
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.
 
Old 08-28-2003, 04:08 PM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
This thread can help you setup Internet Connection sharing.
http://www.linuxquestions.org/questi...threadid=82005
 
Old 08-29-2003, 01:27 PM   #4
Melo
LQ Newbie
 
Registered: May 2003
Location: Texas
Distribution: 8
Posts: 19

Original Poster
Rep: Reputation: 0
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
 
Old 09-04-2003, 06:38 PM   #5
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Rep: Reputation: 30
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)
 
Old 09-04-2003, 06:52 PM   #6
dubman
Member
 
Registered: Jan 2003
Distribution: Redhat 9, Fedora Core 1, Suse 8
Posts: 188

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with LAN setup zener Linux - Networking 25 11-30-2005 04:55 PM
how to setup my lan? kpachopoulos General 1 09-06-2005 03:41 AM
about a LAN setup Rex_chaos Linux - Networking 4 08-05-2004 09:47 AM
How to setup LAN in Slackware Iguana Slackware 4 11-07-2003 11:41 PM
Need help on lan setup. jsimone Linux - Software 1 04-05-2002 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration