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.

Thanks. Now the cronjob executes the script file OK and I can see this in webmin (on the inside machine) listed in 'running process'. However, when I'm trying to ssh into the inside machine using

Code:

ssh openemr@xxx.175.xx.251 -p 19999

(where xxx.175.xx.251 is the IP of the middle machine - xx's shown here to hide actual IP number), I just get the error:

Code:

ssh: connect to host xxx.175.xx.251 port 19999: Connection refused

Surprising at what stage of the connection, there's a block.

I've checked both firewalls on the inside as well as on the middle machines, and both are set to accept all traffic. I even tried changing from port 19999 to 465 but the same issue. Even on the router to which the inside machine is connected, I've enabled port forwarding for 19999 (pls see attached snapshot)

Well you still haven't said, but if that port forwarding page is on the router that connects the target server to the internet, then you don't need a 'middle machine' or a reverse tunnel.
Just ssh directly to port 19999 on the target public ip.

Well you still haven't said, but if that port forwarding page is on the router that connects the target server to the internet, then you don't need a 'middle machine' or a reverse tunnel.
Just ssh directly to port 19999 on the target public ip.

Sorry about this. I've now attached a diagram (based on what's shown at http://wiki.fabelier.org/index.php?t..._SSH_Tunneling) which shows the router on the inside - this is the router that connects to the internet and is behind the ISP's NAT and is the reason why I'm having to go the reverse ssh way.

I've done it and the public IP keeps changing - that's how ISP's connect here, giving dynamic IP numbers, plus under each such dynamic IP, there's lots and lots of their users like me connected at any one time.

Googling around for similar solutions brought me to http://www.alexonlinux.com/reverse-s...ind-nat-router
and I tried it and it works well.
However, the issue I'm facing there is, it's not making a permanent connection from "inside machine" to "middle machine" and since the machine I'll be having as the "inside machine" will be a non-attended PC with no Keyboard, Video or Mouse, I need it to be permanently connected to the "middle machine".

Just a reminder, both "my machine" and "inside machine" are behind ISP's NAT firwalls and somehow using the method described at http://wiki.fabelier.org/index.php?t..._SSH_Tunneling
results in a "connection refused".
For the record, I've also added "GatewayPorts yes" on the "inside machine".