Editing Reverse SSH Tunnel
From Bibliotheca Anonoma
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
Without the ability to port forward a network under a NAT, your server is useless. In the case that you are incapable of allowing incoming traffic to certain ports into your network, you can use a reverse tunnel to give tunnel necessary services through another server elsewhere. | Without the ability to port forward a network under a NAT, your server is useless. In the case that you are incapable of allowing incoming traffic to certain ports into your network, you can use a reverse tunnel to give tunnel necessary services through another server elsewhere. | ||
Edit <code>/etc/ssh/sshd_config</code>. | |||
<pre>$ sudo nano /etc/ssh/sshd_config</pre> | <pre>$ sudo nano /etc/ssh/sshd_config</pre> | ||
Line 12: | Line 12: | ||
<pre>$ sudo systemctl restart ssh</pre> | <pre>$ sudo systemctl restart ssh</pre> | ||
Finally, you can create the tunnel | Finally, you can create the tunnel. The format is <code>ssh -N -R :<local port>:localhost:<remote port> <username>@<remote ip></code> | ||
<pre> | <pre> |