1

In local port forwarding, is the ssh server, client or both proxy (server) ?

In remote port forwarding, is the ssh server, client or both proxy (server) ?

In dynamic port forwarding, is the ssh server, client or both proxy (server) ?

Why is dynamic port forwarding said to create a proxy server, while I don't see local or remote port forwardings are said to create a proxy server? By definition of a proxy (server), is local or remote port forwardings not qualified to create a proxy (server)?

Thanks.

3

Yes. If you use ssh -D 1080 user@remotehost, this sets up a SOCKS4 proxy on localhost:1080, so that all traffic sent through 127.0.0.1:1080 is routed through the remote host. ssh -D is generally regarded as the SSH SOCKS4 proxy tunnel.

Other variations of port forwarding via SSH can also be considered proxies. In the simplest terms, a proxy is a middleman that you route traffic through in order to reach another destination.

While it is not necessarily a proxy software or appliance, it can be adequately utilized to proxy traffic in specific scenarios, and thus would absolutely be considered a proxy in these types of situations.

  • 2
    Strictly speaking, the OP asks whether the server is a proxy. It could be said that it's actually the client which functions as a proxy, rather than the server. That's just a detail, though. – Wouter Verhelst Oct 6 '15 at 6:22
  • @Wouter: Thanks. In local forwarding, is the SSH client the first level proxy, and the SSH server the second level proxy? In remote forwarding, is the SSH server the first level proxy and the SSH client the second level proxy? In dynamic forwarding, are both ssh client and server proxies? – Tim Oct 6 '15 at 13:36
  • 1
    @WouterVerhelst: Yes, it the SSH client that creates the proxy, but while that process is running, the local server is indeed being used as a proxy. I will have to ponder on the other questions, because SSH port forwarding gets confusing for me at times, and requires a clear head. I'm at work right now and will follow up later. – rubynorails Oct 6 '15 at 15:05
  • I thought it was SOCKS5. O.o – muru Oct 7 '15 at 16:57
  • 1
    @muru - ssh -D is SOCKS4. SOCKS5 supports authentication. The authentication here is happening within the SSH process itself. After the port opened by ssh -D is listening, anything can connect through that socket to the remote server without requiring authentication. – rubynorails Oct 8 '15 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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