-1

I've got a remote headless PC that sit's behind the ISP's NAT firewall, meaning there's no public IP address.

This remote/headless PC successfully connects to reverse-ssh-tunnel and I can access it from anywhere by

ssh -p port# remoteuseid@middleip#

However, what I need is, to be able to access apps like Nagios & Webmin (that are installed on the remote/headless PC) so I can offer remote support to it. (point to note, the remote/headless PC is based on Ubuntu Server 12.04 Minimal, with no GUI)

it's not actually a web server to host web sites for the world; just acts as a server in a medical clinic for a Patient Record system which is web based. In addition to the Patient Recod system, there's things like Nagios and Webmin which are also installed for remote support and management. Now, this PC sits behind the ISP's NAT firewall. However, I've successfully configured Reverse-SSH-Tunneling and can access this PC anytme & from anywhere with the SSH terminal like Putty. Now I need to be able to log into it's Nagios & Webmin from remote locations with my web browser.

Someone suggested as follows:

you can use a SOCKS Proxy to access web apps. Look up examples of using ssh to create a Proxy - the tunneled connection works the same as any other ssh connection.

So I needed some assistance on this, pls.

user93078
  • 137
  • 2
  • 4
  • 8
  • This is [off-topic for Stack Overflow](http://stackoverflow.com/faq#questions). You might want to ask about this on [Ask Ubuntu](http://askubuntu.com), [Unix.SE](http://unix.stackexchange.com), or [Super User](http://superuser.com) (but search for it there first!). – Eliah Kagan Jan 19 '13 at 00:46

1 Answers1

1

ssh will tunnel HTTP if you want.

Change your ssh command to

ssh -p port# -Lsomeport#:localhost:80 remoteuseid@middleip#

Then when you go to http://localhost:someport#/xxx on your local machine, your connection will be sent to the web server on the machine you are ssh'd to.

antlersoft
  • 14,636
  • 4
  • 35
  • 55
  • WOW! it looks like it working. Thanks antlersoft. I do have one more issue on this - Webmin is accessed from the browser (on the LAN) with the address: https://192.168.0.whatever:10000 How would I access it in such a scenario. I tried https://localhost:19948/:10000 but it refused (19948 is what I used for the someport# that you've mentioned in your code above. – user93078 Jan 17 '13 at 16:43
  • You will have to do a second redirect on your ssh command (you can have as many as you want), like so: ssh -p port# -Lsomeport#:localhost:80 remoteuseid@middleip# -Lsomeotherport#:192.168.0.whatever:10000 remoteuseid@middleip#-- then use localhost:someotherport# to access the Webmin-- – antlersoft Jan 17 '13 at 17:21
  • Thanks so much antlersoft. It works very well. – user93078 Jan 18 '13 at 13:56