Path: ccsf.homeunix.org!CALA-MUZIK!newsfeed.media.kyoto-u.ac.jp!aero.kyushu-u!hakata!ie.u-ryukyu.ac.jp!gama.is.tsukuba.ac.jp!yas From: yas@is.tsukuba.ac.jp (Yasushi Shinjo) Newsgroups: fj.comp.security Subject: Socks over ssh Date: 04 Oct 2005 18:18:28 GMT Organization: Institute of Information Sciences and Electronics, University of Tsukuba Lines: 32 Message-ID: NNTP-Posting-Host: kirk.hlla.is.tsukuba.ac.jp X-Trace: gama.is.tsukuba.ac.jp 1128449875 28764 130.158.83.129 (4 Oct 2005 18:17:55 GMT) X-Complaints-To: usenet@gama.is.tsukuba.ac.jp NNTP-Posting-Date: 4 Oct 2005 18:17:55 GMT Xref: ccsf.homeunix.org fj.comp.security:436 新城@筑波大学情報です。こんにちは。 今日、OpenSSH の衝撃の使い方を目にしました。それは、ssh コマ ンドの -D オプションです。 ------------------------------------------------------------ -D port Specifies a local ``dynamic'' application-level port forwarding. This works by allocating a socket to listen to port on the local side, and whenever a connection is made to this port, the connec- tion is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh will act as a SOCKS server. Only root can forward privileged ports. Dynamic port forwardings can also be specified in the configuration file. ------------------------------------------------------------ これ使うと、Socks 対応のクライアントなら、sshd でほとんど VPN になります。この機能は、いつからついていたんでしょうか。 今日まで気が付きませんでした。 特権ポートの転送ができないのは、リモートの sshd が setuid し て一般ユーザの権限に落ちているからでしょうね。 Unix 系 (MacOSX, Linux含む)は、OpenSSH を直で使えるから問題 ないですね。 Windows 系でこの機能を使うための、なにか手頃なラッパないですか? \\ 新城 靖 (しんじょう やすし) \\ \\ 筑波大学 電子・情報       \\