I'm not sure of how you're trying to 'tunnel' nor why, but most times you can simply use ssh to dynamically forward traffic through your sshd on your server.
The following sets up a SOCKS5 proxy on localhost using port 8080:
The "-C" means compress the data; the "-D" means "Dynamic Forwarding; "8080" = local port; the "-fN" means to fork the process to the background, and Not to execute commands on the remote host.
Then setup your application to use the ssh connection, which depends on which app you're trying to use.
Example for Chrome/Chromium:
For Firefox go to Preferences > Advanced > Network > Settings;
Choose "Manual Proxy..." type "localhost" in the "SOCKS Host" field and check "SOCKS v5" and set the port to the same one you used in the first command - in this case it's "8080."
Spoiler (Click to View)
Then go to a new tab (Ctrl + T) and type:
in the URL field.
Click through the nag screen, and type the following into the "Search" field:
This should return something about "blah-blah-remote.dns..." where you right-click on the last field to "Toggle" from "False" to "True." (this sends your DNS requests through the SSH connection)
Spoiler (Click to View)
Close out of that, and open some site that tells you what your IP address is to see if you're using the SSH "tunnel."
Spoiler (Click to View)
The following sets up a SOCKS5 proxy on localhost using port 8080:
Code
ssh -C -D 8080 -fN [email protected]Then setup your application to use the ssh connection, which depends on which app you're trying to use.
Example for Chrome/Chromium:
Code
chrome --proxy-server="socks://localhost:8080"For Firefox go to Preferences > Advanced > Network > Settings;
Choose "Manual Proxy..." type "localhost" in the "SOCKS Host" field and check "SOCKS v5" and set the port to the same one you used in the first command - in this case it's "8080."
Spoiler (Click to View)
Then go to a new tab (Ctrl + T) and type:
Code
about:configClick through the nag screen, and type the following into the "Search" field:
Code
remoteSpoiler (Click to View)
Close out of that, and open some site that tells you what your IP address is to see if you're using the SSH "tunnel."
Spoiler (Click to View)

![[Image: u2fPyL6.jpg]](https://i.imgur.com/u2fPyL6.jpg)
![[Image: ZZLpubQ.jpg]](https://i.imgur.com/ZZLpubQ.jpg)