# Router -> windows -> linux   linux can't surf

## MaheS

I have a wireless router (192.168.1.1)

My windowsxp laptop is conected to it (192.168.1.170)

My nic on my laptop has the ip 192.168.0.1

My linux connected to my laptop has the ip 192.168.0.2

With my linux, i can ping everything, (eg: www.gentoo.org)  I can log in to ftp sites,...   

What I can't do is: surfing,  downloading files from http,ftp,...

/etc/resolv.conf

```

     nameserver 192.168.0.1

```

Anybody knows how to solve this?

----------

## Kroni

Hm,

Hi... I am a total Linux Newbie but maybe i can help .. i had the same problem some time ago. The problem was a fail configuration in my router. The router blocken port 80 to my IP. Test it .. i could ping www.google.de but i couldn't surf ... does ur browser send u a message like : Can't reach ... Connection refused ? If yes then u get blocked by ur router...

Hope i could help .. good luck  :Wink: 

----------

## RAPUL

Could you explain better your lan setup?

Which node has direct connection to internet? Are you using nat or windows shared internet connection?

----------

## nydriek

Hi, I have the same problem. I can ping websites, but i cannot download anything. My router is configured properly, allowing port 80.

What information do you guys need to determine the problem?

----------

## RAPUL

It would be interesting:

0) Be sure router is configured properly.

1) Lan schema. An ascii-art can be useful. If we talk about ips better use yours.

2) Firewall configuration on the linux machine. Are you using any firewall? iptables?

3) Check other services on the linux machine such as ftp, irc, msn, etc... Write any check you do. Example: ftp ftp.suse.com, lynx http://www.google.es

4) It would be nice to "telnet www.gentoo.org 80" and send a get command. If you cannot telnet to a port 80 you cannot browse...

----------

## nydriek

Right now i have a wireless router set up, a Windows XP machine is connected with a wireless nic card. I'm running Gentoo 2.4 through VMWare. I setup a virtual network to bridge with my wireless nic card.

I did not change anything to do with a firewall, so i believe it is not set up. I installed the iptables packages to see what you were talking about but i'm not sure how to use it.

Lynx found www.google.com but did not make a http connection.

I am not sure how to install packages that i download on another machine.. i didnt it once but was unable to reproduce the effect. So I was unable to test ftp or telnet.

Does that help at all?

----------

## khippy

Hi MaheS,

please post the output of 

```
route -n
```

----------

## nydriek

ha sorry i know this isnt my thread.. but i need some help too   :Embarassed: 

```

Destination   Gateway      Genmask      Flags   Metric   Ref   Use   Iface

192.168.0.0   0.0.0.0      255.255.255.0   U   0   0   0   eth0

127.0.0.0      127.0.0.1      255.0.0.0   UG   0   0   0   lo

0.0.0.0      192.168.0.1   0.0.0.0      UG   0   0   0   eth0
```

----------

## MaheS

I added the dns from my isp to /etc/resolv.conf  :Exclamation: 

```

  nameserver 192.168.0.1

  nameserver 195.238.2.22

  nameserver 195.238.2.21

```

That seems to help a little,  but only google works   :Question:   :Question:   :Question: 

khippy:

route -n :

```

Destination   Gateway      Genmask      Flags   Metric   Ref   Use   Iface 

192.168.0.0   0.0.0.0      255.255.255.0   U   0   0   0   eth0 

127.0.0.0      127.0.0.1      255.0.0.0   UG   0   0   0   lo 

0.0.0.0      192.168.0.1   0.0.0.0      UG   0   0   0   eth0

```

Rapul:

Note:  If I replace the gentoo by an other windows, it works!

0:  router is configured correctly!

1:  

```

INET|-----|MODEM/WiFi Router|-))     ((-|WindowsXP|-----|Gentoo| 

                          192.168.1.0/24        192.168.0.0/24

```

2: No firewall (as far as I know) iptables isn't even merged

3:

FTP:  I can login, see files, change dir's, ...    When i GET a file     the last thing any non gui program says is:   150 Opening BINARY mode data connection for foo.doc (3009536 bytes).      A more gui like ftp client  (gfpt/konqueror)  says: transfer stalled

HTTP:  verry verry strange:  I can use google.be!  but that's it,  there aren't any more sites available.  Links says:  Request sent!    that's as far  as he get's  When I surf to  www.mail.be     firefox shows in the status: Waiting for www2.mail.be    so redirecting also works!

MSN:  connection to host login.passport.com is broken

ICQ:  My status is online,  I can see the status of other people,  but I can't talk with them!

emerge sync:   works perfectly

emerge foo:   same as ftp  :Wink: 

My ftp server on my windowsXP is perfectly accesible from my gentoo!  I also can surf perfectly to my modem/WiFi router with gentoo

4: I have no telnet client installed :'(   and emerge doens't work.

----------

## think4urs11

a rather 'quick shot into the dark'

do an ifconfig eth0 mtu 1412 on your gentoo box (assuming eth0 is the correct NIC)

XP with ICS (internet connection sharing) behaves like a NAT router and thereby shortens the maximum size for ip packets by some bytes.

A value of 1412 (default is 1500 for ethernet) works for all environments i know (e.g. VPN through NAT).

Drawback on this is sligthly more cpu load because of the smaller packets but OTOH the only way  :Wink: 

HTH

T.

----------

## MaheS

1412 helped a little    then I put it to 1000

AND    WHOOT WHOOT WHOOT WHOOT  :Smile:   :Very Happy:   :Smile:   :Smile:   :Very Happy:   :Very Happy:   :Shocked: 

I works almost perfectly now!!!

thx dude!

----------

## MaheS

I was wondering

This worked automaticly with 2 windowsXP computers.     Is this a  "it's not bug, it's a feature"  thing?   Or is this really a bug?

Or is it a problem with windowsXP.   

I runned winroute(only DNS configured) for a while on my winxp and It worked perfectly  - although my windows could only be reached with the IP-adres not by the name and I couldn't reach other computers on the lan (= the subnet 192.168.1.0/24). When I gave gentoo the ip of my ISP's dns  some site's became available.    I was wondering what a dns has to do with packet size ??? :s     Or was this just coincidence.

----------

## Bootmoop

Now this is another shot in the dark, but it happens alotin our dorm. It may be that your browser is not set up properly and that you do not have the http port open. This is just a shot but it sounds like the same thing.

----------

## nobspangle

If your setup is like this

router>windows>linux

then don't use ICS on the windows box, just bridge the two NICS in the windows box, this effectivly puts the linux box on the same physical network as the router.

----------

