æ軽㪠ssh dynamic port fowarding
ãã¼ããã©ã¯ã¼ãã£ã³ã°ããããæ©ä¼ã£ã¦ããããããã¾ãããã
ä»åã¯sshã§ç°¡åã«SocksProxyãå©ç¨ããæ¹æ³ãç´¹ä»ãã¾ãã
ãã¦ãsshã®manãè¦ã¦ã¿ã¾ãããã
ã¨ããããæ¸ãã¦ããã¾ãããã¾ãããããã«-Dãã¤ãã¦ããã°ããããã§ãã
-D [bind_address:]port
Specifies a local ``dynamic'' application-level port forwarding.
This works by allocating a socket to listen to port on the local
side, optionally bound to the specified bind_address. Whenever a
connection is made to this port, the connection 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 configura-
tion file.
ä»åã¯1080ãã¼ãã§è©¦ãã¦ã¿ã¾ãã
ããã ãã§OKã
# ssh -D localhost:1080 {servername} -l {ã¦ã¼ã¶ã¼å}
確èªãã¦ã¿ã¾ãããã1080çªãListenããã¦ããã°OKã§ãã
ãã¨ã¯Firefoxããå©ç¨ããå ´åã¯ä»¥ä¸ã®è¨å®ãããã¡ããã°ãSocksProxyçµç±ã§æ¥ç¶ãã§ãã¾ãã
# netstat -an | grep 1080
tcp4 0 0 127.0.0.1.1080 *.* LISTEN
Firefox
â
ç°å¢è¨å®
â
詳細
â
ãããã¯ã¼ã¯ãã以ä¸ã®æ§ã«è¨å®ãã¾ãã
ããã ãã§OKãsshããã¨ãã«æ¥ç¶ãããµã¼ãã¼ãSocksProxyã¨ãã¦Firefoxã使ç¨ãããã¨ãã§ãã¾ãã
ä»åã¯Firefoxã®ã¿ç´¹ä»ãã¾ããããsocksã«å¯¾å¿ãã¦ããªãã¢ããªã対å¿ããããã¨ãã§ãã¾ãã
Mac/Linuxãªäººã¯tsocksã§ããã¾ãããWindowsãªäººã¯freecapã使ãã°å©ç¨å¯è½ã§ãã
# æ£ç´ãç°¡åããã¦æãã§ãããã³ã¬ã