PDA

View Full Version : Connecting fedora laptop to the internet through winXP


supadid
2007-02-02, 06:43 AM CST
I don't have a router at the moment but i do have 2 NICS in my XP machine (for Mrs Supadid as i haven't got her converted to linux....yet)

I am trying to share the internet of the XP machine to my fedora laptop.

NIC 1: Connected to internet, with internet sharing via ICS.
NIC 2: Connected to laptop via crossover

I have read that when your XP machine is set as a ICS then it acts as a DHCP, so i have set the fedora laptop to use DHCP but with all the settings in place and a reboot of the network services it can't ping the xp machine or access any websites.

So i tried just using static ips for both pc's and then setting the fedora laptop to go through the xp machine as a gateway. The two machines can ping eachother but still no internet.

Any ideas anyone? :confused:

sideways
2007-02-02, 07:11 AM CST
DHCP should work.

You should at least be able to to ping the ICS machine when configured as a dhcp server, it's ip should be 192.168.0.1. (Type ipconfig in a dos command prompt to check) Are you certain that your fedora laptop's network settings are correct

system-config-network -> in the dns tab set primary DNS to 192.168.0.1
Then edit the properties for your laptop's nic and in the General tab select 'Automatically obtain IP Settings with dhcp' and 'Automatically obtain dns information from provider', and save the settings

Then type 'service network restart'

To ensutre you configured the windows ICS correctly here's a guide
http://www.petri.co.il/configuring_ics_on_windows_xp.htm

One last possibility is that windows XP firewall is blocking you, maybe try disabling it if you don't get any joy, and if that works then figure out which port(s) you need to open on the firewall before reenabling it.

Relixx
2007-02-02, 08:01 AM CST
dont forget to tell the XP machine to allow other machies to use its connection (option should be in the network settings somewhere)

sideways
2007-02-02, 08:39 AM CST
Also, you need to set the DNS to the ip of the 2nd nic on your windows machine (the one the crossover cable is connected to). So it probably won't be 192.168.0.1 (as I first suggetsed) if the other nic is connected to a dhcp router. Check it with ipconfig on the windows machine.

supadid
2007-02-02, 09:58 AM CST
Also, you need to set the DNS to the ip of the 2nd nic on your windows machine (the one the crossover cable is connected to). So it probably won't be 192.168.0.1 (as I first suggetsed) if the other nic is connected to a dhcp router. Check it with ipconfig on the windows machine.

Ok so i've just done the following:

Laptop (Fedora) set to get IP from DHCP, DNS has been set to the IP of the card connected via the crossover.

Restarted the network service and it fails trying to ping 192.168.0.1

I don't know why it's trying to ping this IP as i haven't entered it anywhere :-S

sideways
2007-02-02, 01:21 PM CST
can you post the contents of /etc/sysconfig/network-scripts/ifconfig-eth0, the ouput of ifconfig on your fedora laptop and the output of ipconfig on your windows machine

cheers

supadid
2007-02-02, 01:37 PM CST
First up my XP ipconfig...

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :
Autoconfiguration IP Address. . . : 169.254.33.193
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : cityisland.ask4internet.com
IP Address. . . . . . . . . . . . : 83.100.143.24
Subnet Mask . . . . . . . . . . . : 255.255.255.128
Default Gateway . . . . . . . . . : 83.100.143.3

/etc/sysconfig/network-scripts/ifconfig-eth0

# Silicon Intergrated Systems [SiS] SiS900 PCI Fast Ethernet
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:A0:CC:D6:14:F2
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
DHCP_HOSTNAME=

ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:A0:CC:D6:14:F2
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6139 (5.9 KiB) TX bytes:3672 (3.5 KiB)
Interrupt:5 Base address:0xcc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3338 errors:0 dropped:0 overruns:0 frame:0
TX packets:3338 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4938000 (4.7 MiB) TX bytes:4938000 (4.7 MiB)


Thanks for offering to look at it :)

marcrblevins
2007-02-02, 01:40 PM CST
Is that XP PC using firewall like ZoneAlarm? Years ago, I used to use Windows ME's ICS with my dial-up 56k modem and set ZoneAlarm to middle security. All other Windows had ZoneAlarm with security to max. Windows and Fedora gets on internet automatically.

supadid
2007-02-02, 01:46 PM CST
Is that XP PC using firewall like ZoneAlarm? Years ago, I used to use Windows ME's ICS with my dial-up 56k modem and set ZoneAlarm to middle security. All other Windows had ZoneAlarm with security to max. Windows and Fedora gets on internet automatically.

I am using f-secure, there is the option to add an IP address onto a trusted list but the network services on the fedora laptop won't properly start up meaning i don't know what IP it will be given. :confused:

supadid
2007-02-02, 01:57 PM CST
I found something interesting on the error, when i try to start up the network services on my laptop.

It has found the IP of my internet connected NIC and it trying to ping that IP (83.100.143.24) but all 4 packets fail, so it must be communicating with my XP machine somehow.

It then tries to ping 192.168.0.1 and also fails.

sideways
2007-02-02, 02:05 PM CST
ok, clear the Primary DNS in system-config-network (DNS tab)

then restart networking: 'service network restart'

If it still won't connect can you attach the laptop to your dhcp router just to see if that works

If it works then we know the problem is due to the windows configuration, so we can at least look at that.

If it doesn't work then there may be a problem with the card or cable.

EDIT
and I assume you followed the suggestion above to enable other computers to connect in windows

supadid
2007-02-02, 02:19 PM CST
Cleared the DNS entry but still no luck :(

I can't attach the laptop to the router as it isn't mine. My apartment building has it's own internet, so i just plug my network lead into the availible port in the wall and i'm up on the net after typing in my username/pass.

I don't think it's a cable problem as i can ping each computer if they are setup with static addresses.

sideways
2007-02-02, 02:21 PM CST
You folowed the steps in the guide posted above?
http://www.petri.co.il/configuring_ics_on_windows_xp.htm

Can you try disabling the windows firewall (temporarily)
(and the fedora one as well perhaps)

supadid
2007-02-02, 02:25 PM CST
and I assume you followed the suggestion above to enable other computers to connect in windows

Would that be this area?

http://www.tekstenuitleg.net/img/ics.gif

Screenshot taken from another site pretty much the same as my own.

sideways
2007-02-02, 02:27 PM CST
That would be a start, any luck after disabling both firewalls?

supadid
2007-02-02, 02:36 PM CST
Got it!

It was the silly firewall, i had allowed any computer within the 192.168.0 range but turns out that still isn't enough. The moment i turn the firewall off, it works!

I will keep the firewall on for now and learn how to configure it properly to allow the laptop through.

I feel a little stupid now for not turning it off sooner.

Thanks for all help sideways (and others)

marcrblevins
2007-02-02, 04:16 PM CST
Your Windows XP is the ICS, then if you do a ipconfig at DOS prompt, I expect IP address of 192.168.0.1. That XP is the DHCP server. So any computers hooked up to that will be in the 192.168.0.xxx ranges.

Please show ipconfig in XP and ipconfig in Fedora. Just to see if DHCP is working.

marcrblevins
2007-02-02, 04:19 PM CST
My trust zone range is 192.168.0.1 thru 192.168.0.254