When using ssh -D to setup a socks proxy, DNS queries and DNS traffic are not sent through the ssh tunnel. However, with Firefox a config change can be made to send DNS traffic through the ssh tunnel. Here’s how it works!
Full article here:
Tunnel DNS through ssh -D socks proxy (scottlinux.com)