1

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?

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

1 Answer 1

1

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.

Ex:

 ssh -D1337 -fN [email protected] -C 
3
  • 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 google.com while direct non-proxied requests load fine - but it's worth a shot. Commented Feb 14, 2012 at 23:37
  • @simont, did it help? Commented Oct 16, 2016 at 18:21
  • 2
    @simont i'm experiencing the intermittent slowdowns over reverse SSH tunnel. Did you find what's causing this? Commented May 7, 2020 at 6:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.