Help - Search - Members - Calendar
Full Version: Internet Connection Sharing
Linuxhelp > Support > Technical Support
My problem is that I have 2 pc's (both with Red Hat 8.0 Psyche), and only one ADSL modem. One pc has 2 ethernet cards and the other has 1. What I have done to connect both machines is

$/sbin/ifconfig eth1 netmask
$/sbin/iptables -t nat -I POSTROUTING -s -j MASQUERADE
$echo 1 > /proc/sys/net/ipv4/ip_forward

on the first machine.
This has partially fixed my problem, because now I have the both machines with the same IP. What I do to connect is bring up a ppp connection on the first machine and an eth connection on the second. I want to bring up (on the second box) a ppp connection instead of an eth one, so that I have different IP's on the machines. If anyone has used WinXP this can be done with the 'bridge connections' option.
Any ideas on how can this be done?
Eth0 on PC1 gets it's IP form the ISP via the ADSL modem and probably pppoe...

The setup should be for eth1 (on the PC1 ... the one connected to the net and to PC 2). PC2 (the one with only 1 network card) should have an IP address that is on eth0 (or any IP on the subnet), and be connected to eth1 on a network crossover cable (or through a hub with straight cables).

There is no PPP connection on the second PC ... and the first PC must be on when every the second PC connects to the net.


This thread should help...
I have already done that connection, hughesjr. the setup is like this.
modem<-->ppp0(through eth0)<-->Pc1<-->eth1<-->eth0<-->Pc2
What I want to do is connect the second pc to the modem just as if there were no pc 1 in the way. As I already said, I know this can be done on windows xp, so I guess this is also possible from linux.
The setup I want would look like this:

modem<-->ppp0(through eth0)<-->pc1<-->eth1<-->eth0<-->pc2
...........\ <---->ppp0<-(this link should be done through pc1)->/

note: pc1 should not interfere with pc2's ppp connection.
note 2: I guess the eth1-eth0 connection is necessary, but don't really know
If your modem will allow it, you can connect the modem to a hub and connect both computers to the same hub ... BUT

then you will have 2 IP addresses (one on each PC) ... most of the time, your ISP will not allow more than 1 IP unless you have a Business account.

So that's why internet connect sharing was born ... you get 1 external IP ... from the PC conencted to the net (in this case eth0) and you can connect to as many PC's (via a hub) as you want to eth1 of the gateway PC ... and you have many internal (192.168.0.x) and only 1 external IP...

This is the same wether you use Windows XP, Linux, Mac or UNIX...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.