If the output has a DROP all line at the bottom like the following example: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) The port used for the reverse tunnel in the command above is 24553, feel free to use whatever port you like and make sure this port is open on the VPS you want to connect the reverse tunnel to.You can check iptables if the port is open by executing the following command: iptables -L -vn Note: Make sure to substitute the SSH user and IP address in the command above to your own SSH user and IP address. We’ll start by setting up the reverse SSH tunnel on the machine that is behind NAT, do that by typing in the following command: ssh -R 24553:localhost:22 We have an easy solution, in today’s tutorial we are going to learn how to set up a reverse SSH tunnel on Linux. Let’s say you have a Linux machine behind NAT and a VPS.You want to SSH to the Linux machine behind NAT from your VPS but you don’t want to bother with port forwarding or your machine behind NAT doesn’t have a static IP address. We’ll explain to you, how to set up reverse SSH tunnel on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |