Dynamic Port Forwarding
Dynamic port forwarding is a transparent mechanism available for applications,
which support the SOCKS4 or SOCKS5 client protocol. Instead of configuring port
forwarding from specific ports on the local host to specific ports on the remote
server, you can specify a SOCKS server which can be used by the user's
applications. Each application is configured in the regular way except that it
is configured to use a SOCKS server on a local host port. The Secure Shell client
application opens a port in the local host and mimics a SOCKS4 and SOCKS5 server
for any SOCKS client application.
When the applications are connecting to services such as IMAP4, POP3, SMTP,
HTTP, and FTP, they provide the necessary information to the SOCKS server, which
is actually the Secure Shell client mimicking a SOCKS server. The client will
use this information in creating port forwarding to the Secure Shell server and
relying the traffic back and forth securely, as with user-specified port
forwarding.
For more information, please see the ssh2(1) man pages.