Add windows server for RDP via browser
How to add windows server for one-click RDP access via web browser in Ezeelogin?
Synopsis: This article provides step-by-step instructions on how to add a Windows server for one-click RDP access for gateway users via web browser in Ezeelogin.
Step 1: On the gateway server install nodejs.
Step 1(A): On Centos 7
root@localhost:~ yum install epel-release
root@localhost:~ yum install npm
Step 1(B): On Ubuntu 16/18 and Debian 10
root@localhost:~ apt install npm
Step 1(C): On Ubuntu 20/22
root@localhost:~ apt-get update
root@localhost:~ apt install npm
Step 2. Install n, Node’s version manager:
If you are not using SSL, you need to set the repo to HTTP by running :
root@localhost:~ npm config set registry http://registry.npmjs.org/
root@localhost:~ npm install -g n
Step 3. Install node by running :
Step 3(A): To install the latest version:
root@locallhost:~ n latest
Step 3(B): To install the corresponding version :
root@localhost:~ n version.number
For example, the below command will install node 19
root@localhost:~ n 19
Step 3(C): Run the following command to install the node without SSL
root@localhost:~ n --insecure latest
Step 3(D): To switch between node versions run the following command and refer to the given screenshot.
root@localhost:~ n
Step 4: Install the NodeJS module dependencies for the Web RDP Console application by running the following command.
Step 5: Once installed, ensure that the path to the node binary is specified correctly under Settings > General > Miscellaneous > Nodejs Command.
Step 5(A): The nodejs command field should have the path to the node or nodejs binary which usually is /usr/bin/node in the case of Centos7 and /usr/bin/nodejs in the case of Ubuntu 14-04
Ensure that inbound TCP traffic on port 22555 is open as nodejs server listens on this port. ( you can confirm the port from Ezeelogin GUI > Settings > General > Miscellaneous > RDP Proxy Port)
Ensure that outbound TCP traffic on port 3389 is open as RDP listens on this port.
Step 6: To ensure SSL for the browser tab that opens up for the web RDP, generate a self-signed cert with the following command. Web Shell will work only if the web interface is accessed via HTTPS
root@gateway:# openssl req -new -days 365 -x509 -nodes -newkey rsa:2048 -out /usr/local/etc/ezlogin/tls_cert.pem -keyout /usr/local/etc/ezlogin/tls_key.pem
Make sure to install SSL (self-signed or a valid cert )even if you have installed an SSL certificate on the Load balancer (ELB/ALB). Also, make sure to add a listener and routing for the port RDP Proxy Port 22555
Step 6(A): Or put a valid ca, cert, and key in the files: /usr/local/etc/ezlogin/tls_ca.pem, /usr/local/etc/ezlogin/tls_cert.pem & /usr/local/etc/ezlogin/tls_key.pem respectively. You can rename your current .crt / .key file to .pem file.
Also, make sure that the .pem files are readable by the webserver user such as nobody/www-root/apache, etc. An easy way to grant the web user read privileges would be chmod 644 /usr/local/etc/ezlogin/*.pem
Step 7: Add windows-servers by clicking the add button as shown below:
Step 8: Make sure that while adding a server you have enabled the RDP and mentioned the default RDP port number(3389).
Step 9: Also, make sure that the users have the privilege to access ’ Windows RDP Login ’
Step 10: Click on the Windows icon to RDP into the remote machine
Step 11: Ensure that you have provided the correct username and password in the Ezeelogin software GUI (step 8), when Network Level Authentication (NLA) is enforced on the remote Windows machine.
Pros of browser-based RDP
- Easily RDP via browser in one click
- Don't have to remember the administrator passwords
- No RDP client needed
Cons of browser-based RDP
- Unable to copy and paste the document to the remote desktop.
If you are getting a protocol error, after upgrading the Node version you just need to add --tls-min-v1.0 to the nodejs command in Settings->General->Miscellaneous>Nodejs Command.
Step 1: Ensure that the Node version is above 19 and the NPM Version is >=6
Step 2: To get more detailed errors, append log_level trace in ez.conf.
Step 3: Kill the current running node
root@jump-host:~# pkill node
Step 4: Access the web RDP and check the application logs under {system folder}/application/logs/, ( for example, /var/www/ezlogin/application/logs/log-2020-12-16.php ) to get the command to manually start the web RDP.
Note: Append DEBUG=* at the beginning of the command which you've got from the application logs.
For example
root@jump-host:~# DEBUG=* PORT=52666 XFWD=1 WS=1 SESSION_TIMEOUT=300000 REQUEST_TIMEOUT=120000 DBP='94Y6[@MhW]@Qb' node /var/www/ezlogin/application/external/mstsc/server.js
Related Articles:
How to fix RDP SSL error in Ezeelogin?
RDP Error: This computer can’t connect to the remote computer
Troubleshooting "Connection has been closed" Error in Ezeelogin RDP via Browser
Ezeelogin RDP proxy could not be started
How to record and download RDP recordings?