Using SSH for IPv6-enabled HTTP Proxying

My ISP has apparently made no progress whatsoever with IPv6, but I've got an IPv6 enabled VPS.

SSH makes it trivial to use that VPS as a SOCKS5 proxy. Just do:

ssh -D 8080

Then set your browser's SOCKS proxy to localhost:8080. In Firefox on Linux, this is Edit > Preferences > Advanced > Network tab > (Connection) Settings > Manual Proxy Configuration. Leave all fields blank except for SOCKS Host and Port -- localhost and 8080, respectively. Choose SOCKS5. Then browse to about:config and change change network.proxy.socks_remote_dns to true. This tells Firefox to ask the proxy to resolve names instead of trying to resolve them using your ISP. Chrome worked for me without hassle.

Go to to test that it works. If your results from indicate that IPv6 name lookups are failing, make sure you've got that about:config setting mentioned above changed.

Posted on 2011-11-11 by brian in network .


If you don't want to keep an dummy terminal hanging just for the tunnel, you may use autossh ( ) like this:

autossh -f -ND 8080

autossh: -f causes autossh to drop to the background before running ssh. The -f flag is stripped from arguments passed to ssh.

ssh: -N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).

Thanks for the blog post! It was very helpful.

2012-07-11 19:05:42
Comments on this post are closed. If you have something to share, please send me email.