ssh -D 1337 -N -f -q -C firstname.lastname@example.org
ssh and makes it listen on port 1337.
-Ntells ssh not to execute a remote command; needed since we're just forwarding a connection
-fstarts the program in the background (after you enter your password for the server, if needed)
-Ccompresses the connection
Then open Firefox. Go to preferences. Then network settings. Then click manual proxy settings. Enter these details: