Linux – Intranet over SSH

intranetlinuxsshUbuntuvpn

Thanks in advance for any help/advice provided. I have the following setup

  • I have an Ubuntu server (ubuntu_server) which provides SSH access (using keys only, no username/password) to internet connected users (ubuntu_server is on LAN_1)
  • I can connect to ubuntu_server from Windows clients (windows_client) using PuTTY + Pageant (windows_client is on LAN_2)
  • Using instructions provided here (http://www.devdaily.com/unix/edu/putty-ssh-tunnel-firefox-socks-proxy/1-putty-ssh-tunnel-introduction.shtml) I can use Firefox/Chrome (not tried IE yet) and route my web-browsing on windows_client through ubuntu_server. If I understand correctly its a safe, encrypted way to access internet (if at a public wifi for e.g.).

As a side effect of this, I realized that I can access HTTP/HTTPS/FTP services on ubuntu_server as though they were on the same LAN (i.e. windows_client on LAN_2 can access resources of LAN_1, at least those on ubuntu_server). So I am trying to accomplish the following (not even sure if its doable or feasible)

  • Use "SSH + PuTTY + Firefox/Chrome socks proxy" to provide Intranet access to users who connect to ubuntu_server over Internet but take it further and not only provide access to services installed on ubuntu_server but also from ubuntu_server_2, windows_server_1 – which are on same LAN as ubuntu_server (i.e. LAN_1).
  • So how do I configure it, so that when user SSH' in to ubuntu_server and in Firefox (over proxy of course) enters "https://ubuntu_server_2" they are served by HTTPS service on ubuntu_server_2 (and similarly for windows_server_1)

I did a few searches on Google and ServerFault, and found nothing, but I don't know if I am using the right keywords ("intranet over ssh") to find an answer.

Best Answer

What you are discussing is setting up a Virtual Private Network (VPN). And yes, you can use SSH to setup a primitive VPN, but you might look into the other options, too.

Other links from google search for SSH VPN.

NB: updated the "the other options" link because my first try was way, way out of date, the new one is just way out of date.