# ports >1024 blocked, internet slow [SOLVED]

## sjeur

On my network, all connections to ports >1024 are blocked. This seems to result in very slow connections.

I can't unblock those connections, so that's no option.

Browsing websites, fetching mail, etc. is extremely slow (max 7KB/s). 

I have discovered that ACTIVE FTP transfers are fast (maximum speed of my ISP), although passive FTP transfers are slow.

All other protocols seem to be slow too.

Does anyone have an idea why this is, or how to get around this?

Also, this only seems to apply on Gentoo. I have tried other distros, OpenSUSE and Ubuntu for instance, they don't have this problem.

In Windows XP, there aren't any problems either.Last edited by sjeur on Fri Jan 12, 2007 3:49 am; edited 1 time in total

----------

## mose

Web browsing uses port 80, so I think that isn't related to your port blocking. 

How did you realized that ports >1024 are blocked?

By the way, are you behind a router?

----------

## sjeur

I am indeed behind a router. It all worked well until the network admin blocked the ports >1024, so I do think it's related.

I asked him to remove the block, it then worked good. But the ports are to be blocked here.

----------

## mose

So the problem isn't with Gentoo... but with the router! Sorry, I can't help you with that   :Confused: 

----------

## sjeur

I know, but why does it work on all operating systems, except for Gentoo?

----------

## mose

I don't know exactly why...

Try to post the output of 

```

netstat

```

maybe we'll get some more informations

----------

## madisonicus

To be more precise, http connections are initiated on port 80 but after handshaking they move to ports above 1024.  It's very unlikely that any reasonable network admin has actually blocked these ports.  There are far better ways to prevent filesharing which is the usual reason for netadmins cracking down on ports.

There are a couple other possibilities that come to mind.  The first is that since Gentoo is one of the few distributions which actually uses window scaling by default, that somewhere along the line there's a broken router that improperly handles it.  Try doing this: 

```
# echo 0 /proc/sys/net/ipv4/tcp_window_scaling
```

If that clears up your problem, you can set it as a default by adding net.ipv4.tcp_window_scaling = 0 to your /etc/sysctl.conf.

Also, you might need to go through the network parts of your kernel to make sure things are set up properly.

HTH,

m

----------

## sjeur

 *Quote:*   

> echo 0 /proc/sys/net/ipv4/tcp_window_scaling

 

Thanks, that did the trick!

----------

## price

Thanks --- this helped me solve my problem also.

Noticed a small error in the line above that tests the fix, though.  I believe it should be:

```

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

```

(i.e., missing redirection.)

----------

