[-dYNAmaX111-]
03-16-2004, 05:52 AM
Ok here is the scenario. I am getting broadband the modem that i am getting doesn't have a built in router (meaning only 1 person can log in at the same time --so i think anyway) no i dont want to by a route. A friends told me that i was possible if i use 2 NIC cards. Now i have got it working in windows but i would like the server (2 NIC cards) to be set up in linux so i can download stuff in linux while sharing dsl. I just wanted to know what i need to do to be able to do this. I have an 8 port HUB and lots of cable. And the dsl modem that i will be getting is a dlink dsl-300+ which only has 1 port.
Just alittle more info if it help you guys.
In windows i had to install PPPoE
My linux box is Running Debian with 2 kernel versions, 2.4.22 and 2.6.0(first stable release)
[-dYNAmaX111-]
There is a way to use one of your computers as a gateway for the other computer whereby the internet connection will be in computer #1 first NIC and then you can setup Linux on that box to act as a gateway to the internet for other boxes to connect to the internet at the same time.
I'm not too sure how this is done as I run SmoothWall (http://smoothwall.org) on an old PII 233 which acts as a router to all of my systems. But I have found a few threads here at JL that could help...
This is from this thread (http://justlinux.com/forum/showthread.php?s=&threadid=92898&highlight=ipchains+routing+two+nic)
Keep in mind that any Linux box can be a masked router. It's just a matter of how many slots you can stick NICS in. Also, there's no need to get extra IP addresses, esp. with RR or any other ISP that uses Dynamic IP Addresses.
The Linux router is NOT a "proxy" per se. It could be, but the definition of a proxy is a machine or unit that looks at the CONTENT of each TCP/UDP packet it handles, checks it for certain things, and then sends it on its way, denies it, or drops it. CONTENT is the big key word there.
Routers by themselves use NAT (Network Address Translation), and Linux boxes that act as routers use IP Masquerading, which for all intents and purposes is the exact same thing. All they look at is where a packet comes from, where it wants to go, and the IP addresses involved. They do NOT examine CONTENT of packets.
A box can be a proxy AND a "router". A plain old $80 Linksys router CANNOT be a proxy, because it doesn't have the necessary brainpower. Routers ain't that smart, it turns out.
Basically, you could buy a router or build a Linux box to do this:
ISP DHCP Server
|
|
CABLE LINE
|
|
IP ADDRESS: 66.77.88.99 (addresseable from anywhere)
CABLE MODEM: (passes on its IP Address to the router/box.)
|
|
ROUTER/BOX: Also a DHCP Client. Outside IP address (what everyone else sees): 66.77.88.99
INSIDE IP ADDRESS __THIS IS THE IMPORTANT PART__: 192.168.0.1 This address is NOT addresseable from the Internet at large.
This box then acts as a DHCP Server for the 192.168.0.0 network, which is what your computers are on. They lease 192.168.0.x addresses from it, and are not individually addresseable from the rest of the internet. The router hands the packets off to the machine that requested them, which it recognizes via the MAC Hardware address of the Ethernet Card that the request packets came from.
|||||||||
Your Computers.
You could also use one Box to mask the addresses, and then buy a much cheaper "switch" that serves out the addresses:
Cable line, modem
|
|
Routing box, doing the masking.
|
|
Switch.
||||||
Computers on the network.
Also, 192.168.x.x is one of three sets of "non-addresseable" address ranges specifically reserved for cases exactly like this. It's also the most commonly used of the three in small applications, because of the number of addresses it encompasses.
Anyway, I hope this helps and that someone who knows a little more will be able to come along and let you know exactly what to do.
Jamie
Just found the exact thing that you need in the Just Linux Help Library (http://justlinux.com/nhf/Networks/Easy_Internet_Sharing.html)
Using IP Masqerading and the two NIC setup that I mentioned earlier on.
http://justlinux.com/nhf/Networks/Easy_Internet_Sharing.html
HTH
Jamie
[-dYNAmaX111-]
03-18-2004, 11:33 PM
Thanks very much for your help mate. That was very helpful. Things a swing along nicely.
Cheers
[-dYNAmaX111-]
Originally posted by [-dYNAmaX111-]
Thanks very much for your help mate. That was very helpful. Things a swing along nicely.
Cheers
[-dYNAmaX111-]
No problem at all - didn't really do anything!
Glad that I could help.
Jamie
:)