-   Linux - Networking (
-   -   ICS - XP box has ICS enabled, Linux box to connect, how? (

Thymox 11-06-2001 06:12 AM

ICS - XP box has ICS enabled, Linux box to connect, how?
Got my LAN working now (including basic SAMBA stuff), but:

How do I get my Linux box to connect to the internet via a WinXP box?

My computer doesn't have a modem, and even if it did, I couldn't really connect it up, as the phone point is bloody miles away. My flatmate's computer (running XP - why, oh, why, oh, why?) is connected to the internet and has ICS enabled. How can I connect to the internet via his XP-box?

(actually, still can't figure out how to do this in Windows either)

Would I be resigned to using his ISP, or could my computer specifiy a phone # to dial.

Cheers muchly.

Thymox 11-30-2001 08:12 AM

We did it under Windows, but it insisted on using 'Automatic IP Configuration' which we all know to be DHCP. Now, does anyone know how to set my Linux box to use a dynamic IP address for it's gateway? If not, how easy would it be for us to get Window's gateway jobby running on static IP addresses - presumably then I could quite easily get Linux to use my house-mate's static IP'ed XP box as a gateway?

mcleodnine 11-30-2001 12:58 PM

If XP is acting as a reasonable DHCP server then all you need is a DHCP client. dhcpcd and pump are two of the more common utils.

ChaosX2 11-30-2001 07:55 PM

To have ICS enabled on Windows XP one of the network cards has to have a static IP. Normally its If the windows machine is configured right all you need to do is have your linux box setup for DHCP.

Netvyper 12-06-2001 08:43 PM

I have a similar Problem.

I have my Win2k Box running ICS for this computer, a win98SE Machine, and a WinME machine downstairs... which is a doddle to setup :)

My Mandrake 8.1 box seems to be networking ok.. SORTOF:rolleyes:

It wouldn't get a DHCP address trying 5 times and getting a DHCP Reply NAK or something similar.... i'll check next reboot.
I can ping the other computers fine.
Although not with their Windows Computer Names... should i be able to?
Ping Works
Ping Proxy Doesn't

i also can't ping any external Sites... getting an "Unable to locate Server" error in netscape

The KDE Connection thing (Network Monitor) Tries to connect, and both sends and recieves Data... so it is obviously talking to something.

However, no External connections are available.

As far as i know, i have just the TCP/IP protocol installed, and atm have a Fixed IP of

What else can i do to try to get on the web?

DavidPhillips 12-07-2001 12:18 AM

ICS - XP box has ICS enabled, Linux box to connect, how?

try dhcpcd eth0

if it works check this file...

USERCTL=no #optional
PEERDNS=yes #this will probably not help with ICS

put the nameservers in /etc/resolv.conf

route -n

if the default gateway is not shown do this

route add default gw

DavidPhillips 12-07-2001 12:22 AM

Although not with their Windows Computer Names... should i be able to?
Ping Works
Ping Proxy Doesn't

you can add them to /etc/hosts and that will work

Thymox 12-07-2001 11:37 AM

OK, got him to set his computer to a static IP (, mine is statically on regardless of OS. Am I right in thinking, then, that all I need to do is route add default gw and I can connect through his box? Once I've done this, will it have to be done on every reboot?

RecoilUK 12-08-2001 12:10 PM

I have this setup also.

I have static ip on win and Linux but run winipconfig u( u dont have to in xp its in the properties box) and find the dns server ip.

Set the dns server manually in Linux and your done.( for a dialup connection in Linux its usually in the ppp dir and called resolve.conf) but I set mine up at install so dont really know.

Hope that helps


DiBosco 12-08-2001 02:04 PM

I got ADSL (Openworld) a year ago and set it up so that I had a Win2k machine with the USB modem on it. If you share the modem, Win2k automatically sets itself up as and becomes the DHCP server. You have no choice AFAIK. I'd be surprised if XP didn't work in a similar way.

When I installed Mandrake 8.1, Mandrake automatically detected the settings, it just worked.

Even if you've already installed Mandrake, if you go to Control Centre (the one on the desktop) and go to Network and connection, there's an automatic setup page there. Make sure you make your Linux box get its IP address dynamically and that you get your Internet access via the LAN. Mandrake should see as the Internet gateway and it should just work!

This was the easiest and most pain free part of all my Linux tinkering. :-)

If only bloody Samba was so easy! ;-)

Thymox 12-10-2001 09:48 AM

Damn it! He's gone back to DHCP! Oh, Man! I've found that Samba is a doddle compared to my tinkerings with this! Basically I really do not like letting programs do things themselves unless I know (or at least understand the principles behind) how it does it!

The more I try and get this to work, with XP doing its 'Let me do it for you - it'll work straight away and you'll never have to think about it again' strategy and my ME box going 'Hmm, this looks interesting - maybe you should try this...', the more I pull my hair out!

All I want is this:
XP box static @
Linux box static @
WinME box static @ (yes, it's dual boot)
WinME box2 static @
And for them all to dial out via (the XP box).

What I've got it this:
The XP box DHCP @ ???.???.???.???
Linux/WinMe Static @
WinME2 DHCP @ ???.???.???.???

I believe (from reading the above) that the computer with the modem (XP box) needs to be static, and the others can be DHCP.

The biggest problem I have is that I do not have control over the XP box (it's not my computer, after all) and Dave (who's computer it is) wants it all to be 'Automagic' (aka DHCP), which I don't.

Hmm, maybe after the Christmas break I will have sorted it out. My brother wants me to help him set up a internet gateway for his house. I've suggested using some flavour of Linux because it's more stable (which he seems to have reluctantly agreed), and then I can get on with setting-up a 4th computer in our flat (with Linux) to be our internet gateway. At least then I'll have control over the gateway's properties!

BTW: I'm not really a control freak, it just bugs me that others cannot see that doing their way causes problems for others (I've had it for 4 years so far at Uni).

DavidPhillips 12-10-2001 10:11 AM

it can be dhcp or static it will not matter to the server which you say is not yours.

my laptop here is setup something like your system, I will post my stuff here and you can compare it with yours

the main thing is that it is sharing the connection with and .3 your client boxes.

and the ip is set using ifconfig like you have in the post you already have it set

also you have the default gateway set

running route -n will confirm that it is set

the default gateway line will have UG in it

Destination Gateway Genmask Flags Metric Ref Use Iface U 0 0 0 eth0 U 0 0 0 lo UG 0 0 0 eth0

ifconfig will show that the ip is set

[root@Microdot root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:Bc:td:35:g4:60
inet addr: Bcast: Mask:
RX packets:1081429 errors:0 dropped:0 overruns:0 frame:0
TX packets:1036870 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:1085457938 (1035.1 Mb) TX bytes:196046750 (186.9 Mb)

lo Link encap:Local Loopback
inet addr: Mask:
RX packets:1851 errors:0 dropped:0 overruns:0 frame:0
TX packets:1851 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:283636 (276.9 Kb) TX bytes:283636 (276.9 Kb)

the other requirement is dns



DavidPhillips 12-10-2001 10:24 AM

by the way mine is setup using dhcp

to do it you need this


if you want it to come up on boot

use ONBOOT=yes

if the /etc/resolv.conf file does not get the nameserver in it from the dhcp then edit it

DiBosco 12-10-2001 11:15 AM

OK, OK, keep your hair on, I was only trying to help! ;-)

In case you're interested - you can easily have some computers with static IP addresses and some with dynamic on the same LAN. If you make the DHCP master (your XP box in this case) dish out IP addresses over (say) and give your static machines addresses under that, your DHCP master will never try to assign addresses that you've already assigned statically.

The situation of XP wanting to be your nanny and DHCP is very different, surely? All you're saying with DHCP is I don't really *care* what my IP address is, your Netbios name always stays the same and that's what the humans on the nyetwork see.

When I first started doing network stuff I was a bit wary of DHCP, it seemed like it would make things complicated, but once you set it up, you can forget all about IP addresses and life becomes much easier when you're maintaining the network; you don't have to keep a record of who has what IP address and don't have to worry about assigning the same address to two people.

Apologies if I'm missing the point here, I'm not trying to tell you you *have* to do it one way or another. I've had so much help setting up Linux from the likes of Dave Phillips generously advising, I was just trying to pass on some of my knowledge. :-)

Linux is pretty complicated to set up, so anything that can get me going more quickly and giving me more time to tinker and learn as I go along is good in my book.

btw, if you think people can't see that you might want to do things in different ways at Uni, just wait 'til you get into the real world and deal with politics of the office! <g>

Thymox 12-11-2001 07:32 AM

Sorry, just re-read my last post - it did sound a bit narky, didn't it. I didn't mean to be rude, I thought I was getting somewhere with my housemate, and then he decides, with no forewarning, that he's going to go back to DHCP.

I can see the possible benefits of using DHCP from the actual networking point-of-view, and I am quite happy to use it (I go '//DAVE' in network neighbour-hood, or whatever, like everyone else), but when it comes to manually setting up connecting to the internet through a gateway, I'm pretty sure that you can't say '//DAVE' (if I'm wrong, can someone let me know as this would be a god-send), but you have to specify an IP address.
Now, if XP is the DHCP server, from which all others will be given their IP addresses, then will his IP be static, even if my computer (which isn't the DHCP server) is booted before his?

Here's what I'm reading:
I can set my machine to statically be The XP box can be the DHCP server and give out dynamic IP addresses to all others machines in the range of -->, with the exception of because that's my machine. Am I right so far? If this is so, would the XP box always be, and how could I stop it from assigning to my sisters' computer if that's booted before mine?

Thanks for keeping with this thread, even with the agro attitude portrayed in my earlier post.

Oh, and I'm not going to be getting into all that office politics stuff, I'm going for classroom politics! That's right, I'm a complete masochist in that area, I'm going to be a teacher! GCSE/A-level grade (not sure what the American system does, but it's kids between 11-18) in either Biology, Human Biology or General Science, depending on the school.

All times are GMT -5. The time now is 04:00 PM.