Click to See Complete Forum and Search --> : Easy Internet Connection Sharing????


jrbush82
08-27-2001, 10:47 PM
All I want to do is setup this Linux box so that I can share my connection to a Windows '98 box. Is there any easy way of doing this? I am running Slackware 8.0

Thanks,
Jason

VRay
08-28-2001, 02:16 AM
I assume you have 2 nics? If so, try pmfirewall, easy to set up and will set up masquerading for you.

jrbush82
08-28-2001, 12:15 PM
auctually no, I have a 56k dialup modem, and a nic in one machine, and 1 nic in the other. All I want to do is share my connection to the second machine.

ihateBill
08-28-2001, 04:04 PM
IMO, PMFirewall is still the best/easyest way to do it. Just know that your external interface is ppp0. Think that's it but I may be wrong...

bdg1983
08-28-2001, 04:37 PM
Have you tried the Internet Connections Sharing in the Control Centre?

Not a Mandrake user myself though I have read some of their documentation.

Try this from Mandrake. (http://www.linux-mandrake.com/en/doc/80/en/user.html/draknet.html)

[k]
08-28-2001, 07:13 PM
someone correct me if i'm wrong but... :confused: (i mean... that's what i got at home)...

if you are using your linux box to connect to the internet you'll need a 2nd nic in there to go to your winbloze box! then you can setup an ipforwarding to the win box!

so in recap... 2 nic card in the linux box (1 to internet and 1 to windows box) and 1 nic in the windows box.

that's what i did and it works! :)

spickus
08-28-2001, 07:16 PM
I like PMFirewall as well but it will require two NICS. You say you're running Slack 8, which kernel?

SkyNet
08-28-2001, 08:13 PM
You do not need two NIC's in one machine to share your internet connection. Not even if's it's Cable/DSL modem.

I have currently switch'd over to a two NIC network however for a very long time; I used one NIC to share an Internet connection between 4 computers.

All you need is for the Routing machine to have at least one NIC and use IP_Aliasing to set it up so that you can create virtual ethernet's ie.) eth0 eth0:0 eth0:1 etc....

If you need indepth help with this let me know. I'll be glad to give you a hand.

Captain Penguin
08-28-2001, 09:46 PM
Originally posted by SkyNet:
<STRONG>You do not need two NIC's in one machine to share your internet connection. Not even if's it's Cable/DSL modem.

I have currently switch'd over to a two NIC network however for a very long time; I used one NIC to share an Internet connection between 4 computers.

All you need is for the Routing machine to have at least one NIC and use IP_Aliasing to set it up so that you can create virtual ethernet's ie.) eth0 eth0:0 eth0:1 etc....

If you need indepth help with this let me know. I'll be glad to give you a hand.</STRONG>


I'd like to know how you pulled THAT off. you NEED two nics. One nic for the net connection and one to share it to the other computer. The only work around would be if you used a serial or usb connection.. which would be slow as all hell.


Anyways, the EASIEST way is to use Mandrake 8. Thats what I've done. (I use a linux box as an ICS Gateway). I'd like to use Slackware to do it, but I can't figure out how to get it to recognize 2 nics :confused:

[ 28 August 2001: Message edited by: Captain Penguin ]

Sawz
08-28-2001, 10:11 PM
SkyNet is right guys. All you really need is ONE NIC. I have done it myself, Ip Aliasing is a wonderful thing. Don't say its not possible just because you havent heard of it before or don't know how to do it. Just give it a little though and maybe even give it a try and you will see. Then you will feel stupid for doubting someone that knows more then you in that specific area.

SkyNet
08-28-2001, 10:14 PM
Originally posted by Captain Penguin:

I'd like to know how you pulled THAT off. you NEED two nics. One nic for the net connection and one to share it to the other computer. The only work around would be if you used a serial or usb connection.. which would be slow as all hell.


Anyways, the EASIEST way is to use Mandrake 8. Thats what I've done. (I use a linux box as an ICS Gateway). I'd like to use Slackware to do it, but I can't figure out how to get it to recognize 2 nics :confused:

[ 28 August 2001: Message edited by: Captain Penguin ]

Yes you can use just one NIC. I clearly explained that in my previous post.

All you need is for the Routing machine to have at least one NIC and use IP_Aliasing to set it up so that you can create virtual ethernet's ie.) eth0 eth0:0 eth0:1 etc....

[ 28 August 2001: Message edited by: SkyNet ]

SkyNet
08-28-2001, 10:21 PM
Originally posted by Sawz:
SkyNet is right guys. All you really need is ONE NIC. I have done it myself, Ip Aliasing is a wonderful thing. Don't say its not possible just because you havent heard of it before or don't know how to do it. Just give it a little though and maybe even give it a try and you will see. Then you will feel stupid for doubting someone that knows more then you in that specific area.

Hey Sawz,

Thx, Sometimes ppl just need to read between the lines.

Captain Penguin
08-28-2001, 10:27 PM
GAH. Explain the hardware setup if it's possible.

A NORMAL NIC only has ONE plug in it, for a Cat 5 cable which would plug into your cable/dsl modem. how are you going to get this computer on the network if you only have one nic? HOW i ask?

jrbush82
08-28-2001, 10:35 PM
I have ONE Network Interface Card, and ONE 56K Dial-up modem. I have shared my connection before with Mandrake 8.0 without any problems. I switched to Slackware 8.0 using the 2.4.5 kernel. I love it, all I want now is to share my Internet connection. I know it is possible, I just don't know how to do it manually. I've been working vigerously to figure this out, and yet to succeed.

Check out another post I've been working with some ppl to get this up and running...

http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=13&t=005073

SkyNet
08-28-2001, 10:36 PM
Originally posted by Captain Penguin:
GAH. Explain the hardware setup if it's possible.

A NORMAL NIC only has ONE plug in it, for a Cat 5 cable which would plug into your cable/dsl modem. how are you going to get this computer on the network if you only have one nic? HOW i ask?

Ok for this to work for a Cable/DSL connection you will need a Router with one NIC and a Hub. Ok you plug the Cable/DSL into Uplink port on Hub then you plug the Router into port 2 of the Hub since usually port one is linked with the Uplink (But that depends on your Hub) Now you configure IP_Aliasing module to have eth0 and eth0:0 ---- eth0 is the externel internet IP while eth0:0 is the internel intranet IP. I can draw this if you really want.

Since he is only connecting One box to another and is using Dial-Up then he should not even need Aliasing because the one NIC will be the Intranet and the Dial-Up will be the external but if he needs the NIC to talk to the Dial-Up as well then he could use IP_Aliasing to do that.

Captain Penguin
08-28-2001, 10:38 PM
Originally posted by SkyNet:
<STRONG>Ok for this to work for a Cable/DSL connection you will need a Router with one NIC and a Hub. Ok you plug the Cable/DSL into Uplink port on Hub then you plug the Router into port 2 of the Hub since usually port one is linked with the Uplink (But that depends on your Hub) Now you configure IP_Aliasing module to have eth0 and eth0:0 ---- eth0 is the externel internet IP while eth0:0 is the internel intranet IP. I can draw this if you really want.

</STRONG>


... You should NEVER plug a cable/dsl modem directly into a hub/switch. HUGE security risk, and your ISP will detect it. Unless the aliasing thing you speak of deals with that issue, you should not tell people to do that!

Anyways, I thought you might have been talking about doing that, but I didnt' think you'd be crazy enough too :eek:

SkyNet
08-28-2001, 10:42 PM
Originally posted by Captain Penguin:

... You should NEVER plug a cable/dsl modem directly into a hub/switch. HUGE security risk, and your ISP will detect it. Unless the aliasing thing you speak of deals with that issue, you should not tell people to do that!

Anyways, I thought you might have been talking about doing that, but I didnt' think you'd be crazy enough too :eek:

Why do you think they created Firewalls? Anyway I am not going to argue this point with you any furthur. If you don't understand it then you'd better learn it before you de-grade someone in a forum.

jrbush82
08-28-2001, 10:46 PM
still haven't solved my problem :(

Captain Penguin
08-28-2001, 10:48 PM
Originally posted by SkyNet:
<STRONG>Why do you think they created Firewalls? Anyway I am not going to argue this point with you any furthur. If you don't understand it then you'd better learn it before you de-grade someone in a forum.</STRONG>


I'm not degrading you I was holding a conversation. Although that comment about me not understand makes me want to degrade you :mad:

I was just pointing out something that I have learned in the past. What do you mean "thats what firewalls are for"? Do you mean software firewalls? Why would you use software firewalls when you can spend $10 on an extra NIC AND save a port in your hub/switch, and at the same time make the ICS gateway a PHYSICAL firewall? (which is the best kind!)

Sorry if I sounded "degrading", I guess I was a bit huffy, I thought you were crazy or something ;)

Captain Penguin
08-28-2001, 10:49 PM
Originally posted by jrbush82:
<STRONG>still haven't solved my problem :(</STRONG>

Ah yes.. sorry. Try Mandrake 8 first off.. it really is as simple as pressing "next" a few times and then "finish".

SkyNet
08-28-2001, 10:49 PM
Originally posted by jrbush82:
still haven't solved my problem :(

Ok tell me what NIC is it? I want to know it's full name. etc (mine is) D-Link 10/100 DFE-530TX+ what is yours? I'm going to tell you how to setup your intranet with Slackware once you give me that information.

I cannot help you with your ppp0 connection since I do not have a modem to play with or have ever attempted to attain internet connection that way.

SkyNet
08-28-2001, 10:58 PM
Originally posted by Captain Penguin:

I'm not degrading you I was holding a conversation. Although that comment about me not understand makes me want to degrade you :mad:

I was just pointing out something that I have learned in the past. What do you mean "thats what firewalls are for"? Do you mean software firewalls? Why would you use software firewalls when you can spend $10 on an extra NIC AND save a port in your hub/switch, and at the same time make the ICS gateway a PHYSICAL firewall? (which is the best kind!)

Sorry if I sounded "degrading", I guess I was a bit huffy, I thought you were crazy or something ;)

Ok I'm going to have to get off of our topic because we have a bigger issue at hand. To help the person that asked for help.

It sounded to me as if you were trying to de-grade me. It was just the way I interpreted your words. Okay you don't understand IP_Aliasing you may never understand it, because you may never need to use it. If you never need to use it then what's the point in understanding it right? Well anyway I needed it for a great deal of time, simply because I am a broke college student. For some of us it's the only option.

Just know this. There is a way to use only one NIC in your routing machine and connect both to the internet and the intranet. So never tell anyone that there's not a way. Also if you really want to know IP_Aliasing there are some HOW-TO's and I'm sure once you read one them you'll understand no problem.

Anyway again lets get down to helping out jrbush82.

Oh and my apoligies as well.

[ 28 August 2001: Message edited by: SkyNet ]

jrbush82
08-28-2001, 11:02 PM
I have a Kingston 10/100 network card. I know the network card already works on eth0 because I can play UT over the network with another Linux/Windows box. I don't understand how much differnet setting up ICS through a modem is from a network card, because the only difference I would think is that in the firewall script you use ppp0 instead of eth0 as your internet connected device and eth0 instead of eth1 as your network card.

SkyNet
08-28-2001, 11:12 PM
Ok then your eth0 is working. Now you need to setup a route to your ppp0.

I'll give an example

Lets say your internet IP is 24.43.16.321
So your route's should look like this

Destination Gateway Genmask

192.168.1.0 0.0.0.0 255.255.255.0

24.43.16.0 0.0.0.0 255.255.255.0

0.0.0.0 24.43.16.1 0.0.0.0


192.168.1.0 should be your eth0
and 24.43.16.0 should be your ppp0
0.0.0.0 should be your ppp0 with the gateway.

This is assuming ppp0 takes the place of one of the ethernet cards.

to add or modify route's use the route command. You must be su.

Wait Wait...I just realized something? Are you forwarding your ports from your internel IP's to your Externel IP's?

[ 28 August 2001: Message edited by: SkyNet ]

[ 28 August 2001: Message edited by: SkyNet ]

jrbush82
08-28-2001, 11:42 PM
yes, I would forwarding the requests from the windows box to the internet

[ 28 August 2001: Message edited by: jrbush82 ]