LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-21-2002, 02:16 PM   #1
Negativ13
LQ Newbie
 
Registered: Dec 2002
Location: TX
Distribution: Mandrake 9.0
Posts: 22

Rep: Reputation: 15
Windows and Linus sharing an internet connection...


Can it be done? I simply cannot install Linux to my laptop (see other post) and I MUST have internet connection available on it (see wife).

I have XP and Mandrake 9 on the desk top. I want to be able to share its internet connection through a cable modem when I am in Linux on the desktop (its not a problem when I am in XP).

I have them both connected through a LAN. Is this possible or do I need to be a programmer to figure it out.

Basically, I want to be able to feed the laptop an internet connection from my desktop through the LAN no matter what OS I am in. There, I said it.
 
Old 12-21-2002, 02:26 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
no problem

just set it up for the same network configuration you have with windows so everything stays the same.

Give us some more info on how you have things hooked up and we can help you get her up and running.

It sounds like the cable modem is hooked up directly to the laptop, is that right?
 
Old 12-21-2002, 03:14 PM   #3
Negativ13
LQ Newbie
 
Registered: Dec 2002
Location: TX
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Cable modem goes to a NIC card in my desktop.

Another NIC card in my desktop feeds a Netgear HUB.

the hub feeds a NIC card in the laptop.

I'm not real familier with LANs or networking. I know that the NIC on my dektop gets its IP from (DHCP) the cable company.

The other NIC that runs my LAN is set at 192.168.0.1

Then I hit "Set up home or small office" and everything works.
 
Old 12-21-2002, 03:47 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
in linux you need to run this command to make it work the same way.

Code:
dhcpcd

you will need to be root, so as a normal user
run this and give the root passwd, after running
dhcpcd press crtl_d to get back to a normal user.

Code:
su -
 
Old 12-21-2002, 05:15 PM   #5
Negativ13
LQ Newbie
 
Registered: Dec 2002
Location: TX
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
I just tried that. Didn't seem to change anything.

The dektop (XP) has MSHOME listed as it's work group. Does that have anything to do with it connecting to Linux?

I don't want to change anything at the laptop so it will be able to connect when the desktop in in XP. I need to make all changes to Linux so I can connect under it.

I can get to the internet just fine at the desktop under Linux as well as XP. I just need to get the laptop to the internet through Linux.

Has anybody done this before? If it is possible I must have it set up wrong. I ran the Internet connection sharing wizard in Linux and still nothing.
 
Old 12-21-2002, 08:45 PM   #6
kejar31
LQ Newbie
 
Registered: Dec 2002
Posts: 11

Rep: Reputation: 0
you could just go out and buy one of those cheap routers at bestbuy it will perform NAT for you and hand out all the IP address. Then you wont need to even leave the desktop on to have the laptop connect to the internet. Other then that I am not sure on how to set up Internet connection sharing in linux. but i did find this with a simple google search (internet connection sharing "linux")

http://www.homenethelp.com/web/howto...e-internet.asp

hope it helps.
 
Old 12-21-2002, 09:24 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Sorry I misunderstood, I thought Linux was on the laptop


you need to setup ip masquerade, and also make linux a dhcp server to give out ip address to the lan.
 
Old 12-21-2002, 09:35 PM   #8
Negativ13
LQ Newbie
 
Registered: Dec 2002
Location: TX
Distribution: Mandrake 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
I'm not familiar with ip masquerade at all. How do I set it up?
 
Old 12-21-2002, 09:49 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you can find some scripts here

http://www.linuxguruz.org/iptables/


basically you need to set firewall rules to masq the internal clients ip so they can get connected to the internet.


the actual rule that does the masquerading..

iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE

Last edited by DavidPhillips; 12-21-2002 at 10:04 PM.
 
Old 02-12-2003, 04:02 PM   #10
MooktaKiNG
Member
 
Registered: Feb 2003
Location: London, UK
Distribution: Gentoo/Debian
Posts: 39

Rep: Reputation: 15
If your using Mandrake. Then this can easily be done using the GUI configuration.

Personally, i haven't tried it. But i'm sure it works great.
 
Old 02-15-2003, 02:17 AM   #11
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Rep: Reputation: 15
Cool Windows XP with Mandrake 9

I am having a similar problem with getting Internet connection sharing working with XP and MDK9 - the only differences being -
The internet comes in thru my Linux box - at 56k and thru my lan into windows XP - when i run XP to XP it works a treat -

Now my problem starts here -

One of you said that DHCP is needed, is that the DHCP-Server and DHCP-Common packages? i just installed them. what i need to know is what's the deal with xp's workgroup settings (ie - MSHOME)? do i just ignore them? and as long as my lan and IP settings are the same all should be well????

And how do i mount shared locations so that they are accesible for both os's?

i can mount partitions, are network drives similar???

mount /dev/nda /mnt/network

Something like that? (it's just a guess)

Well i'm hoping that someone has answers for me! (it's very lonely in a windows world)!!!
 
Old 02-15-2003, 09:37 PM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Just setup the iptables rules and enable ip forwarding and then it will work with a properly configured machine running any operating system that works with tcp/ip

The use of dhcp is recommended to setup the ip address, default gateway, and dns just to make things work when you plug the cable in. Or you can setup all those things manually on your clients and it will still work.

Last edited by DavidPhillips; 02-15-2003 at 09:39 PM.
 
Old 02-17-2003, 09:20 PM   #13
sacants
LQ Newbie
 
Registered: Feb 2003
Location: Wellington, Aotearoa
Distribution: Mandrake 9.0
Posts: 8

Rep: Reputation: 0
Dunno if you care but....

As a recent convert to Mandrake 9.0 (which *rocks*) from Windoze (which doesn't) I attempted to network Mandy 9 and Win 98 machines, share files and modems etc.

After much stuffing aboot, I did a clean install and followed the very clear instructions for Samba config at http://dcfonline.sfu.ca/ying/linux/samba/part7.html (Samba allows file sharing - haven't done the printer yet....?) to share files between both machines.

What about the modem I hear you ask? Well, as my 56k dialup WINMODEM (boo, hiss) is already in my 98 box I used WinProxy (http://www.winproxy.net/ - an easily configured proxy server for Windoze) and after a few clicks had the modem shared! Very simple and works for net, mail, ftp and news access. Better yet, it's free if you only have two machines and are happy with a sub-1MB cache.

The only trouble I have is that WinProxy seems to interfere with the Linux box contacting Webmin and SWAT servers - so I just turn it off when I need to!

I was amazed how simple this was and felt the urge to share.

Hope it helps (*someone*).

P.S. Am running ZoneAlarm Pro on the win98 box and ran fwgen.php on the Linux box and everything is still happy. Don't ask for my fwgen config tho (as if you say) 'cause I relied on a mate for that.

Last edited by sacants; 02-17-2003 at 09:23 PM.
 
Old 02-20-2003, 03:30 PM   #14
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I hate to tell anyone how to setup their network, but I just wanted to get this up there.

You are driving your Yugo to town and leaving the ferrari parked in the garage.


When you get comfortable with Linux, you should use it as a router and ditch the WinProxy.
 
Old 02-21-2003, 12:59 AM   #15
sacants
LQ Newbie
 
Registered: Feb 2003
Location: Wellington, Aotearoa
Distribution: Mandrake 9.0
Posts: 8

Rep: Reputation: 0
Lugo vs Ferrari

Oh don't you worry about that. The only reason I haven't already is my wife won't touch the Linux box (yet - I'm working on her) and so I haven't moved my modem across (or got round to buying another).
 
  


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
Sharing Internet Connection from Windows Machine Eux Debian 7 10-04-2005 05:07 PM
sharing internet connection with windows xp melinda_sayang General 11 12-10-2004 10:51 PM
Sharing internet connection with windows Kontrau Linux - Networking 2 05-02-2004 08:10 PM
Internet Connection Sharing with a Windows PC Chryzmo Linux - Networking 22 09-26-2003 01:10 PM
Windows internet connection sharing Config Linux - Networking 3 02-22-2002 01:17 AM


All times are GMT -5. The time now is 11:18 AM.

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