Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I will be setting up a few raspberry pi's in various locations, and they will be creating reverse nat ssh tunnels to my ssh server.
I need to set up a monitoring server at the server's location to monitor the raspberry pi's through the ssh server. The monitoring agent that will be installed on the raspberry pi's is communicating with the monitoring server on port 4700.
My question is:
Since I am using reverse nat ssh tunnels to connect on the ssh server, I am guessing that port 4700 will not be opened. If this is true, is there a way to also open port 4700 in that tunnel, so the monitoring server can access the remote agent?
If I am reading this correctly, then you want that when you connect over the tunnel to a Raspberry Pi from the server, that the port 4700 on the Raspberry Pi is forwarded to your server. This can be done using the -L option to ssh.
On the server, something like 'ssh -p <port used to create tunnel from Raspberry PI> -L4701:<IP address of Raspberry Pi>:4700 <user>@localhost' would forward port 4700 on the Raspberry Pi to port 4701 on the server.
You would probably want to create the initial tunnel on a different port for each Raspberry Pi.
Thanks for your reply. The command you provided requires me to ssh on the server and from there ssh on the raspberry pi. If there a way to open port 4700 (between the ssh server and the pi) when creating the tunnel? So no additional actions are required?
Not that I'm aware of. You could have the second tunnel pass through the first tunnel (this is what allend's command is doing), but you still need to set up two tunnels. I'm not sure what the problem with this is...it's just one more command to add on the RPi side so it opens right after the existing ssh tunnel. Once you have the necessary ssh keys set up, it's trivially easy to add any number of tunnels you want.