LinuxQuestions.org
Help answer threads with 0 replies.
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 12-14-2005, 05:44 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
Sharing internet connection (DSL router) betweeen two machines


I have two machines at home. One of them is connected to my DSL provider's router which has a local IP address assigned. Both machines are connected by LAN.

Can anybody give me a basic guide on how to share this internet connection between the two machines or point me to any online resources.

Right now I'm using PPPOE in Linux, but I am unaware of how to configure the ethernet port of the router to allow the two machines to share the connection. The two machines are connected in LAN through another ethernet port.

Please don't suggest buying any equipment like network switches or anything because it's not in my budget to buy any new equipment.
 
Old 12-14-2005, 06:21 AM   #2
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
You can do this by making your computer a Gateway to which your DSL is connected. For how to make a Linux Gateway and how to chare connection, you can refer to the following link.

http://newbiedoc.sourceforge.net/net...megateway.html

Here every thing is explained very nicely, and you will get how to make the gateway secure, how to do Masquerading and so on. See 8.2 thats what you want, but I suggest to read the whole document carefully. If the two machines are connected via an another ethernet card or port, you need not to buy any thing else....Enjoy
 
Old 12-14-2005, 09:47 AM   #3
ncorreia
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 37

Rep: Reputation: 15
If linux box is the one connected to the Internet and all you want is http/https/ftp, easiest way to solve the problem is setting up squid there.
 
Old 12-14-2005, 10:07 AM   #4
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
If you want to setup a proxy server and also want to take advantages of caching and other things then ofcourse one can go for squid, it is basically a proxy server. But if you just want to setup a gateway one can do it by some simple means as well.

Well when there are more then ways to do same thing one should try atleast more then one way, atleast to know how things work. This is the beauty of open source, you have more then one solution to chose a better match for your problem, customizing things...bla bla bla
 
Old 12-14-2005, 08:38 PM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Well I also want POP and SMTP because my father uses Outlook Express to check his mail on the Windows box.

A proxy server really doesn't seem a good solution unless of course there's an easy to configure mail server which I can use.

Any suggestions welcome!
 
Old 12-14-2005, 08:43 PM   #6
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
I assume that the first machine that magically connects to the lan (local) and the DSL router has 2 ethernet ports

If it does then it can act as a router and pass it's own and everyone's request to the router .. (Even it is connected with USB or other magic .. it can do it).

So it will need to run the DHCP SERVER so it can dole out out local address (to the folks on the lan)
It will need to run NAT to translate local lan IP to "outside" IP addresses.
It will need iptables or something like it to route traffic.

now you know what to read ..
forget about that stuff about proxyserver and squid .. squid's ar ugly fish and now one really knows if a giant squid exists or not ..
+the last couple of mails are philosophical not technical ..what can one expect from the wonderous valley of bihisht
 
Old 12-15-2005, 05:15 AM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
The machine which is connected to the router indeed has two ethernet ports. One to the router and the other to the local LAN. I assume I'll have to configure IP forwarding? I'm now in unfamiliar territory and I'm not sure how the ISP's technician configured the router.

I'll have to investigate a bit about this. Thanks for the tip.
 
Old 12-15-2005, 05:20 AM   #8
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
Well in my very first mail I have said the same thing, you need to make the machine a gateway (router), which is connected to DSL. I also have mentationed about NAT (Masquerading) and given the link which describes every thing how to do all this.
Its all about playing with ipchains and iptables, For NAT just reffer to "Linux IP Masquerade HOWT" on tldp. You dont need to run a DHCP server for just one another machine. I dont know where people find philosophical thing.

Well I also do not suggest squid, for your problem but doesnt means squid is useless . Think of if you have a complete network behind, instead of just one machine?
 
  


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
two machines, one router, no connection blue.spark Linux - Networking 2 04-14-2005 03:26 AM
Internet connection sharing between 2 slackware machines Random`Zero Linux - Networking 6 01-03-2005 11:22 PM
Internet Connection Sharing 2 FC1 machines explorer Fedora 1 05-05-2004 02:09 AM
DSL Ethernet USB Combo Router + Internet Sharing kenny_zzz Linux - Networking 0 02-28-2004 03:05 AM
Internet Sharing on Linux machines varunbihani Linux - Networking 10 07-20-2003 09:34 AM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration