Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
I can ping from my WIN98 machine to the Linux - eth1 (192.168.1.1) and form Linux to the Win98 (192.168.1.3) and can access the WEB from Linux but cannot from Win98 nor can I ping the ISP from Win98.
Please open a terminal, become root (type 'su' and then root password) and run 'route' and 'iptables -L'. Please send the results. The problem is probably connected with eth1 gateway - there should be none on eth1. Linux machine should have only your ISP gateway set.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Gateway for eth1 should be fine, since that's tell it where to send packets bound for the 192.168.1.0/24 subnet (which is correct, since that subnet is directly connected via the switch).
Since the LAN can ping the Linux box, and the Linux box can surf the web, it's 90% done. All you should need is to make the default route point to the gateway for eth0 (not the IP of eth0, but the gateway for eth0). That should be it.
One other thing that could be a problem is DNS. It's possible that the internal clients are not pointing to a valid DNS server (you can use the same DNS server from your ISP that eth0 is using, or you can setup a caching-only name server on the Mandrake box and point all your LAN computers to use that as primary DNS--the IP of eth1).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.