Tuesday, October 15, 2019

How (If possible) can I create multiple routes for RDP connections when the request will always include port 3389?

Here's the scenario along with my current setup and what I'm working with. I'll preface this by stating I'm a tech enthusiast, not by trade, so try not to cringe at this question.

I have a server in location x. This server hosts two Windows virtual machines. Windows 10 instance #1 RDP port listens on port 3389 and Windows 10 instance #2 listens on port 3399.

The server is sitting behind a pfsense router. I use a dynamic DNS with NameCheap to redirect all traffic from mywebpage.com to my WAN address. I have set a port forwarding rule so that all RDP requests on port 3389 are forwarded to my virtual machine instance #1. This works perfectly fine. I have another port forwarding rule for requests from port 3399 to go to instance #2. So mywebpage.com:3399 will route to Windows 10 instance #2. This also worked fine.....mostly. Until I encountered an issue.

I have client machines behind firewalls that I cannot control which can ONLY make RDP connections using port 3389. And here lies the dilemma.

Circling back to my initial question, is it possible to use some sort of combination of NGINX and port forwarding rules on pfsense to allow the initial query to request and RDP connection using port 3389, but be able to connect to a different local IP on the server?

Is this sequencing practical/logical/possible?

Windows RDP Software request mywebage.com:3389 ---> My WAN address @ port 3389 ----> Local IP of Windows Client #1 @ port 3389

Windows RDP Software request rdpsubdomain.mywebpage.com:3389 ----> NGINX listening for subdomain "rdpsubdomain" -----> Proxy_Pass to Local IP of Windows Client #2 @ port 3399 (I assume if this sequence worked, 3389 would work too).

Any quick info or tips on how this can, can't work?



No comments:

Post a Comment