LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-15-2006, 10:57 AM   #1
vishivishi
LQ Newbie
 
Registered: Apr 2006
Location: New York
Distribution: Mandriva 2006
Posts: 10

Rep: Reputation: 0
Sharing Linux Internet Connection with XP


Hello everyone,

I am a Linux newbie and I have the following questions/problems. I have two boxes, one with Fedora Linux and the other one with Win XP Pro. Linux machine has two network cards. One connects to the internet through the router, the other one is connected direcly to the XP machine. Internet works fine on the Linux machine but I can't figure out how to make it share the connection with the Windows box.

Essentially, I want the Linux machine to be a server to share the connection AND files and have the Windows box work as a workstation.

My questions are:

1. how to configure the Linux machine
2. how to configre the Windows machine

Thanks a lot,
Vishi
 
Old 04-15-2006, 11:19 AM   #2
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Quote:
Originally Posted by vishivishi
Hello everyone,

I am a Linux newbie and I have the following questions/problems. I have two boxes, one with Fedora Linux and the other one with Win XP Pro. Linux machine has two network cards. One connects to the internet through the router, the other one is connected direcly to the XP machine. Internet works fine on the Linux machine but I can't figure out how to make it share the connection with the Windows box.

Essentially, I want the Linux machine to be a server to share the connection AND files and have the Windows box work as a workstation.

My questions are:

1. how to configure the Linux machine
2. how to configre the Windows machine

Thanks a lot,
Vishi
you mention you have a router....why not connect both machines directly to the router and the router to the internet...this way you should be able to have both box connected to the internet....then make sure you have samba installed and with the correct local ip addressing and permissions both bax talk to each other as well as the internet..
 
Old 04-15-2006, 11:56 AM   #3
vishivishi
LQ Newbie
 
Registered: Apr 2006
Location: New York
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Hey, thanks for your reply. I like your quotes! I am glad I am not of one those who know nothing

Back to Linux. The thing is, I am teaching myself networking and since it is very possible real-world setup, I want to figure out how one should configure something like that, when literally one box is a linux server and the other is just a regular WIN XP client. Like I've said, I am new to Linux, I am reading some books but I am still somewhat confused and ignorant. For example, I know I need to configure Samba but what exactly I should do there? And what should I do in the Windows Machine? Just run usual network setup wizard?

Thanks again,
Vishi
 
Old 04-15-2006, 12:34 PM   #4
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Quote:
Originally Posted by vishivishi
Hey, thanks for your reply. I like your quotes! I am glad I am not of one those who know nothing

Back to Linux. The thing is, I am teaching myself networking and since it is very possible real-world setup, I want to figure out how one should configure something like that, when literally one box is a linux server and the other is just a regular WIN XP client. Like I've said, I am new to Linux, I am reading some books but I am still somewhat confused and ignorant. For example, I know I need to configure Samba but what exactly I should do there? And what should I do in the Windows Machine? Just run usual network setup wizard?

Thanks again,
Vishi
i have to leave for a flight,,,,but my girlfriend Liz may be able to get back to you tomorrow...
 
Old 04-15-2006, 07:11 PM   #5
vishivishi
LQ Newbie
 
Registered: Apr 2006
Location: New York
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks, I'll be waiting...
 
Old 04-17-2006, 09:05 PM   #6
Roknrol
LQ Newbie
 
Registered: Apr 2006
Location: Las Vegas, NV
Distribution: PCLinux
Posts: 5

Rep: Reputation: 0
Very similar problem...

For those of you that wanted a real-world situation, this is it

I have a cable connection coming into our home in one room, with a router plugged into that. My wife's computer is plugged directly into the router. My computer, in another room, is attached to the same router via a long CAT5 and a hub (the hub is so that I can have multiple PC's on this side of the house without having to run multiple cables...besides, it's cheap).

I have just recently acquired a Unix Server which I plan to use for file hosting. The Server has it's onboard NIC as well as a Sun Multiport Ethernet card. My plan is to do away with the hub entirely and plug my computer, my son's computer, my laptop, and have an extra port on the Server for future machines - basically, I wanna set up the Linux Server as an additional router. I realize that my wife's computer will no longer be directly connected to the network - that's fine.

Essentially, my son's computer (the only one plugged into the Ethernet card at the time) cannot detect that it is even plugged in. I'm not completely braindead when it comes to networking, but I'm far from a genius when it comes to Linux. The Server can see the XP box, but XP cannot see the server...any tips?

Thanks in advance!
Roknrol
 
Old 04-17-2006, 11:36 PM   #7
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
Quote:
Originally Posted by Roknrol
...The Server can see the XP box, but XP cannot see the server...any tips?
Do you have samba installed on the server? Windows will only see a linux server if it has the samba server installed.
Quote:
Originally Posted by vishivishi
...I want to figure out how one should configure something like that, when literally one box is a linux server and the other is just a regular WIN XP client.
Because I don't know what distro you are using I can't help too much but if it's a Debian based distro then the tutorial at This page should help. Also internet connection sharing on linux it called NAT (Network Address Table) so searching for that and linux should help you out too.
 
Old 04-18-2006, 12:50 AM   #8
Roknrol
LQ Newbie
 
Registered: Apr 2006
Location: Las Vegas, NV
Distribution: PCLinux
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by binary_y2k2
Do you have samba installed on the server? Windows will only see a linux server if it has the samba server installed.
I only had the client installed. I'll install the server tonight and get back with everyone sometime tomorrow to let y'all know how it works out

Thanks!

Roknrol
 
Old 04-18-2006, 01:04 AM   #9
Roknrol
LQ Newbie
 
Registered: Apr 2006
Location: Las Vegas, NV
Distribution: PCLinux
Posts: 5

Rep: Reputation: 0
Hmm...I'm not sure if this helps or not - remember, I have 1 XP box plugged into the extra Ethernet card, and the other plugged into the same network via a hub...but I can see the server from the hub-connected computer...just not from the one that is connected to the Ethernet card. Is there something special that I need to do to set up the Ethernet card to receive a connection or is that what the Samba is for? I'm thinking something needs to be set up for DHCP..is that Samba? Hrmm..these are probably questions that I can answer for myself given a bit of time...sorry

Roknrol
 
Old 04-18-2006, 01:05 AM   #10
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
To setup simple routing between two interfaces, you would do:

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

In this example, eth0 is the one connected to the internet, and eth1 is the one connected to the other computer.
 
Old 04-19-2006, 08:28 PM   #11
Roknrol
LQ Newbie
 
Registered: Apr 2006
Location: Las Vegas, NV
Distribution: PCLinux
Posts: 5

Rep: Reputation: 0
Ok...I've been trying to get the iptables set up, but I keep running into the same problem. Of course, it's something completely different than what I would expect

When I run the above commands, I get a "bad argument `nat'" error - yup, I've checked the spelling and the syntax...the full nine yards. From what research I've managed to do that I understood, it looks like I don't even have the nat table on my machine...I've tried upgrading iptables in the hopes that it would upgrade the various tables as well, but that has been ineffective to say the least.

I'm considering, at this point, to use a different distro. PCLinux had an extremely smooth install and it was very easy to get it to recognize the two CPU's, but this networking garbage is starting to tick me off!

Anyhoo...any suggestions would be more than welcome...I'm going to be doing some searching for a more "Do it yourself" type distro so I can avoid problems like this in the future (and God forbid actually *learn* something while I'm at it...). Any suggestions welcome, any ideas welcome

Thanks for all your help!
 
Old 04-19-2006, 09:57 PM   #12
Roknrol
LQ Newbie
 
Registered: Apr 2006
Location: Las Vegas, NV
Distribution: PCLinux
Posts: 5

Rep: Reputation: 0
Ok, I'm a retard. The font changed what you typed...it merged your double-hyphens into what looked like one hyphen...that was the syntax error...sheesh...

I'll let y'all know how it turns out

Roknrol
 
  


Reply



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 in linux parthbakshi SUSE / openSUSE 1 03-10-2006 12:46 PM
Linux internet sharing connection with XP des33 Linux - Networking 2 03-10-2005 07:05 AM
linux internet connection sharing usa1234 Linux - Networking 3 10-29-2004 11:27 AM
Internet Connection Sharing through Linux 9 unmesh vaidya Linux - Newbie 1 11-25-2003 07:32 AM
Sharing Internet connection via Linux 8.0 troyzeng Linux - Networking 1 09-20-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:56 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
Open Source Consulting | Domain Registration