LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 09-29-2005, 01:35 PM   #1
Eux
Member
 
Registered: Apr 2004
Location: Spain
Distribution: Debian (Woody+Sarge)
Posts: 54

Rep: Reputation: 15
Post Sharing Internet Connection from Windows Machine


Hi guys,

my question is very simple.......recently I have acquired an 6Mbit ADSL connection at home, the problem is that I have the Kit USB thingy....not Router........yet"!

How can I share an internet connection from an Windows XP PRO SP2 machine so I can connect from my Debian box?

I would kindly request for a detailed - step-by-step guide.

Thanks in advance"!



Eux
 
Old 09-29-2005, 01:52 PM   #2
zuessh
Member
 
Registered: Jun 2002
Location: USA
Distribution: Suse 8.0
Posts: 247

Rep: Reputation: 30
You could use squid. It has very good documentation and is pretty easy to set up. then point the windows box to it as it's proxy and you are good to go. I'm sure there are other solutions.
 
Old 09-29-2005, 03:23 PM   #3
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
err, the adsl modem is connected to the winblows or debian box?
 
Old 10-01-2005, 11:40 AM   #4
Eux
Member
 
Registered: Apr 2004
Location: Spain
Distribution: Debian (Woody+Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
Hi,

the adsl is connected to Windows XP Pro SP2...........


Thnx again,


Eux
 
Old 10-01-2005, 01:09 PM   #5
Coldfish
LQ Newbie
 
Registered: Sep 2005
Location: istanbul
Distribution: Debian / Slackware
Posts: 27

Rep: Reputation: 15
The Usb connection have to be like this:

All the settings is valid for the default gateway ip 10.0.0.2. If your default gw ip is 192.168.1.1 blabla , u have to use that ip for the default gw.

Tcp/ip configuration of USB device for windowsXP :
--------
10.0.0.3
255.255.255.0
10.0.0.2 ----> default gateway.
--------
Dns1
Dns2

Tcp/ip configuration of ethernet device for windowsXP :

Auto(DCHP) is the best or

--------
10.0.0.3
255.255.255.0
empty---->(default gateway)
--------
empty(DNS)

Tcp/ip configuration of ethernet device for windowsXP :

Auto(DCHP) is the best or

--------
10.0.0.4
255.255.255.0
10.0.0.2---->(default gateway)
--------
10.0.0.2(DNS)

I hope it helps ...

Last edited by Coldfish; 10-01-2005 at 01:16 PM.
 
Old 10-02-2005, 11:46 AM   #6
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Hi. I'm presuming that you have you're windows machine online now with you're new ADSL USB modem. You will obviously need an NIC (an ethernet pci card) in both your windows machine and the Debian box, unless there already built in on the mobo's of both machines. If you only have 2 machines you can use an ethernet crossover cable to directly connect the two machines. The XP machine is the only one recognisez by you're isp, so you need to trick the isp into thinking that your Debian box is the XP one. For this you will need to use NAT (IP Masquerading) The 2 best tools I have found for this are Guarddog (a GUI firewall config app) and Guidedog (the IP Masqwuerading app) Both available using apt-get install or aptitude install on Debian. As an alternative you can get Firestarter from sourceforge.net, which does the same sort of thing. Guardedog allows you to configure the firewall on the Debian box (which ports to open which ones to leave closed) Read the docs as they explain very clearly how to get onto the net without compromising your machine. Guidedog is really easy for the IP Masquerading, and this just needs to be enabled. I'm only using static IP addresses for my machines (no dhcp) , and am on dialup, so am not too familiar with with ADSL. Right. I havn't been in XP for a while, but have just booted it up. You need local area connection, then Internet protocol (TCP/IP) properties. You should have a DNS server showing here. Write it down so that you can put it on your Debian box. Now I'm not sure what you'll see for the IP address, but if it's the machine thats directly connected to the Internet set it to 192.168.0.1 subnet mask 255.255.255.0 and gateway left empty, as this machine is the gateway. I've got the network connections on my desktop, but the path to it is, Start/Accessories/Communications/Network connections/Local area connection. We'll now go back to the Debian box. You have an ethernet crossover cable connecting form Debians NIC to XP's NIC. I set up my network when I installed Debian and can't find anything to configure it after the install. So we'll go for the under the bonnet way. Open a Konsole, su to root and open a text editor. Gedit,Kwrite, Kate, whatever. Go to /etc/network/interfaces . This is my /etc/network/interfaces for a client machine connected to a Smoothwall Express2 firewall acting as a gateway to the internet with a serial modem using IP 192.168.0.1 as an IP address. See below.

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.0.7
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

iface dsl-provider inet ppp
provider dsl-provider
# please do not modify the following line
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
# please do not modify the following line
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

If you've decided to use 192.168.0.1 as your IP address on the XP machine, you need to enter that under Gateway in this file. The IP address of the Debian box is up to you. Anything from 192.168.0.2 to 192.168.0.254 . Mine is 192.168.0.7. Save the changes and exit the editor. Next we need to set the DNS address on the Debian box. Open a Konsole and su to root. Open gedit or another text editor. Go to /etc/resolv.conf. See below for mine.

nameserver 213.36.80.1

There is only one line here, which is my ISP's DNS server. You should have found your's from you're network info from the XP machine. Create the line with your ISP's DNS address, then save and exit the file.
You may find that you have to reboot the machine "windows style" for the network changes to be made.

I can't think of anything else at the moment. Let me know how it goes. Nigel. aka farpoint

Last edited by farpoint; 10-04-2005 at 07:37 AM.
 
Old 10-04-2005, 05:58 AM   #7
Eux
Member
 
Registered: Apr 2004
Location: Spain
Distribution: Debian (Woody+Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
Excellent "! Thank you both, Farpoint and Coldfish,...........REALLY thanks a lot.

One minor question, what if my idea was to set up my Linux box to share coonectivity to other computers on my network? How would I do it?


Thnx,


Eux
 
Old 10-04-2005, 04:07 PM   #8
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Hi. I do need to correct an error I made. If you are using XP for instance as your gateway machine connected to the Internet, IP masquerading is setup using (if I remember correctly) an option regarding Internet connection sharing when configuring the network. You need to check this option, and then other machines will be able to access the Internet through you're XP machine. Guarddog (the firewall GUI interface) and Guidedog (The IP masquerading app) are only needed if you are you are using a Linux machine connected to the Internet, and want to connect other machines to this one, so as to be able to access the net. Back to your question. If your machine connected to the Internet is the XP one, and the other machine is a Debian box, just connect the two machines together with a crossover ethernet cable, making sure that the XP machine has Internet sharing enabled. To connect more machines to you're XP machine that is connected to the Internet, you will have to obtain a hub or switch. Personally I'd suggest a switch (layer 2) . Then you simply use straight ethernet cables to connect the gateway machine to the switch, and from the switch to the different machines that you want to access the \\\\internet through the gateway machine. Using static IP addresses you will have to asign each machine a different address, anything within the range 192.168.0.2 to 192.168.0.254. The gateway address will remain the same as 192.168.0.1 which is the address of the machine connected to the Internet. You also need to set the DNS address on the individual machines accessing the net through the gateway machine. You should have the DNS server address from you're ISP, and in Debian ,for instance, you create in /etc/resolv.conf the line.
nameserver 213.36.80.1 (this is my ISP's nameserver, don't use this one, it won;t work) I'm not saying networking is easy. It isn't. Post back if you have problems, and I;ll try ,if I can, to help. Nigel..
 
  


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 from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
sharing internet connection with windows xp melinda_sayang General 11 12-10-2004 09:51 PM
Sharing internet connection with windows Kontrau Linux - Networking 2 05-02-2004 07:10 PM
Internet Connection Sharing with a Windows PC Chryzmo Linux - Networking 22 09-26-2003 12:10 PM
Windows internet connection sharing Config Linux - Networking 3 02-22-2002 12:17 AM


All times are GMT -5. The time now is 08:48 PM.

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