Welcome! Log In Create A New Profile

Advanced

Using NGINX to Proxy RDP / SSH (TCP Stream) with Authentication

Posted by Sander2016 
Using NGINX to Proxy RDP / SSH (TCP Stream) with Authentication
July 04, 2016 02:56AM
Hi Guys,

I just wanted to check and see if what i want would be possible with NGINX.

I have 3 different types of services:
- HTTP/HTTPS Websites
- Windows RDP Sessions
- Linux SSH Sessions

What i would like to do is let my students logon to my website (PHP/MySQL) and if they are, only then they have access to each of those services.

Now the problem is they access these services DIRECTLY, so with RDP they directly go to the IP address on port 3389.

So my thinking was i create a NGINX proxy server which accepts the connection, checks if they are logged in preferably via a PHP script i write, and then allows or denies the connection.
For HTTP/HTTPS i think this won't be a problem, but how about the RDP and SSH sessions? I read something about TCP streams should work, but how would the authentication work?

Love to hear (creative) suggestions!

Thanks!
Re: Using NGINX to Proxy RDP / SSH (TCP Stream) with Authentication
July 04, 2016 12:46PM
You might be able to pass authentication tokens between http {} and stream {} via Lua and shared_dict.
Have a look at the Lua API for stream.
https://github.com/openresty/stream-lua-nginx-module

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready