Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Internet Connection Sharing, Have two machines connect with one modem
fsateler
post Sep 30 2003, 07:55 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 30-September 03
Member No.: 1,553



Hello.
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 192.168.0.1 netmask 255.255.255.0
$/sbin/iptables -t nat -I POSTROUTING -s 192.168.0.0/24 -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?
Go to the top of the page
 
+Quote Post
hughesjr
post Oct 1 2003, 06:28 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



Eth0 on PC1 gets it's IP form the ISP via the ADSL modem and probably pppoe...

The setup should be 192.168.0.1 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 192.168.0.2 on eth0 (or any IP on the 192.168.0.0 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.

<--adsl<-->eth0<-->PC1<-->eth1<-->eth0<-->PC2

This thread should help...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
fsateler
post Oct 1 2003, 07:54 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 30-September 03
Member No.: 1,553



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
Go to the top of the page
 
+Quote Post
hughesjr
post Oct 1 2003, 08:50 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th October 2017 - 04:22 AM