Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an apache virtual host running a reverse proxy accepting connections from the servers IP. To access, I'm running an SSH tunnel from localhost -> server, and pointing my browsers proxy settings at localhost:ssh-tunnel-port.

Occasionally (I don't have benchmarks) everything running through the proxy connection is slow. When running Opera, Opera notices and informs me I'm using a slow connection.

I have confirmed that the local link to Internet is not the culprit, and this occurs no matter the browser used.

I'm not sure if it's the ssh tunnel (I'm not using a fast cipher) or the proxy server; but the issue is intermittent and direct connections to the server show throughput much higher than what I'm experiencing through the proxy tunnel. Directly connecting to the affected sites shows that they are delivering content noticeably faster than I'm getting through the proxy tunnel.

What can I do to determine why I'm intermittently getting slow throughput? Is using Apache as a reverse-proxy the best (ie, fastest) option?

share|improve this question
It probably isn't your problem, but tunneling TCP over TCP isn't the best idea. – Zoredache Feb 14 '12 at 22:57
@Zoredache Didn't see the link. Thanks! Implementing something like OpenVPN is on the todo list for when I'm bored. – simont Feb 14 '12 at 23:04
BTW, Have you considered using SSH itself as a socks proxy instead of using Apache? – Zoredache Feb 14 '12 at 23:20
@Zoredache No, I hadn't considered that. I'll give it a look. – simont Feb 14 '12 at 23:35

The only thing you can do to speed things up is using compression on your ssh tunnel. You can use the -c-switch for this.


 ssh -D1337 -fN bart@myserver.tld -C
share|improve this answer
Thanks. I'll give it a shot. I don't know if it'll help intermittent issues - generally the connection is fine (and able to pull down over 1MB/s), other times it's just painfully slow - 3-4 seconds to load while direct non-proxied requests load fine - but it's worth a shot. – simont Feb 14 '12 at 23:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.