I know this is an ancient post, but I think this answer will still be helpful:
You can very easily do this through a SOCKS proxy with NetCat (nc). In your ~/.ssh/config you just add two lines, one that specifies which hosts you want to proxy, and a line to tell it how to connect via nc. Like so:
~/.ssh/config: (tested on OSX, should work on Linux too)
Host 10.*
ProxyCommand nc -X 5 -x PROXY_HOST:1080 %h %p
Replace "PROXY_HOST" with the right thing for your setup.
This causes ssh to, instead of directly opening a TCP connection to the target host (in this case anything that starts with "10." - can be an IP or host name), run the "nc" command with the specified options to actually establish the TCP connection, and SSH does the rest from there. Very handy.
"5" is the SOCKS version, "1080" is the proxy port, "%h" SSH replaces with the host you typed on the command line, and "%p" SSH replaces with the port from the command line (or the default 22).
Best Answer
I know the answer is bit late, but for the reference and for those who are still looking for the answer,
Set the
network.proxy.socks_remote_dns
property in firefox config (type about:config in address bar) to TRUE (just double click the property to toggle the value) to enable dns lookups over your local/remote socks5 proxy.PS: I'm not sure about other browsers :(