SSH のダイナミック転送

ssh -D 8080 -CfN user@server

  • D flag sets up dynamic port forwarding
  • C uses compression
  • f puts ssh into the background
  • N Do not execute a remote command (useful for tunnels)

You then configure Firefox to use socks5 on localhost port 8080

Under preferences -> advanced -> network tab -> Manual Proxy Configuration -> SOCKS HOST localhost:8080

To close the tunnel

killall ssh

確認:

curl --socks5 127.0.0.1:8080 http://checkip.dyndns.com