Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-03-2008, 03:09 AM   #1
Registered: Nov 2006
Location: India
Distribution: Ubuntu 11.04
Posts: 165

Rep: Reputation: 30
Connecting two PC's and sharing Internet connection

I have two PC's. One with Ubunt 7.10 (which is connected to the Internet via Cable Broadband) and another PC where I have XP. I have added an Ethernet Network Card in the Ubuntu PC via which I am trying to connect the Win PC. So my Ubuntu PC shows eth0 and eth1. eth0 is the one where I am connecting to the Internet and eth1 is the card through which I am connecting to the other PC.

I have connected both the PC's via Cable. And I have also assigned local IP to both of them.

So when I ping from Win PC to Ubuntu PC, it's a success and when I ping from Ubuntu PC to Win PC, I can also ping (works only if I am pinging from Win PC).

My questions are :
a) How do I set up my Win PC so that I can access the Internet, which is now available only from the Ubuntu PC.
b) How can I share files among the two PC's?
c) Is this arrangement safe?

I have firestarter installed in Ubuntu PC where I have allowed sharing the Internet option.

Any help will be great for me.
Old 03-03-2008, 07:28 AM   #2
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
A) In the Windows network config, you will need to set the default gateway to the IP for the eth1 network card on the Linux box, and set the DNS servers to the same that appear in the Linux eth0 config. You could also try putting the Linux eth1 IP in as the Windows DNS servers, I don't know if it runs a nameserver automatically.

B) You will need to install and configure SAMBA to share files between the two computers. There are tons of how-tos all over the internet.

C) It's safe. It's definitely a lot safer than having the Windows box be the one connected directly to the internet. I admin several office networks, and have a small Linux router box as the broadband connection for each of them. Nobody has even made it INTO the Linux box, let alone through it to the Windows computers.
Old 03-03-2008, 07:54 AM   #3
Registered: Nov 2006
Location: India
Distribution: Ubuntu 11.04
Posts: 165

Original Poster
Rep: Reputation: 30
Many many Thanks ranger_nemo. A) worked perfectly. This really helped me a lot. I kept on trying and trying but because I have no idea of Networking, I was unable to make good progress.

b) I will read about SAMBA and try to implement the guidance.

c) I am very happy to know that this is safe. Actually I wanted to be sure about it.

Thanks again for your help.


connection, net, sharing

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
Slow Internet Connection when Connecting to Internet on Browsers lennysokol Linux - Networking 8 04-09-2011 04:29 PM
Sharing alcatel speedtouch connection, 2 linux pc's justinv Linux - Networking 2 04-11-2005 03:58 PM
Connecting 2 slack 10.0 machines. Uncommenting rc.modules, sharing adsl connection fabio_listas Slackware - Installation 0 07-12-2004 11:36 AM
Connecting two pc's across the internet fcuku Linux - Networking 1 02-23-2003 07:28 AM
Wireless.. Internet connection but not seeing other pc's biosx Linux - Wireless Networking 3 08-05-2002 11:11 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration