What is Xrdp?
It is an open-source project that allows the graphical access of a remote system using the RDP (Microsoft Remote Desktop Protocol). It is a potent tool because it can create real-time desktop sessions just like you can do on your local machine. This article will help you with setting up the Xrdp on CentOS 8.
How to Set Up xrdp on CentOS 8
Before installing the Xrdp server, you are required to install the desktop environment. The default Desktop environment for CentOS is Gnome.
Use this command to install it:
Enable EPEL on your system if it isn’t already enabled using the following command:
Execute the following command to install xrdp:
After the installation is complete, start the Xrdp server and enable the Xrdp on boot:
Verify if the Xrdp is running:
The editable files of Xrdp are located in the etc/xrdp folder. For normal connections, you won’t need to make any amendments. But if the changes are to be made necessarily, then the main configuration file is xrdp.ini.
After making changes, you are required to restart the xrdp server again:
Xrdp is set on port 3389 by default. If you are running the firewall on your local CentOS machine, you will need to add protocols to allow traffic on the Xrdp port.
Generally, access of Xrdp server is desirable through a particular IP address or specific IP range. Considering an example that you want the connections from the 126.96.36.199/52 range, execute the given command:
# sudo firewall-cmd --zone=xrdp --add-port=3389/tcp --permanent
# sudo firewall-cmd --zone=xrdp --add-source=192.168.1.0/24 --permanent
# sudo firewall-cmd --reload
Giving access from which particular set of rules is generally not an ideal task to do, but to do that, run the following command:
# sudo firewall-cmd --reload
To increase security, setting up Xrdp to listen just on localhost and making an SSH tunnel that safely advances traffic from your nearby machine on port 3389 to the worker on a similar port is a good option.
Or install VPN and connect to the server using a private network.
Connecting to the Xrdp Server
After setting up the server, connect it remotely but remember that windows users are required to open “Remote Desktop Connection” from the windows search bar. After opening it, you will get a pop-up, and it is the RDP client. Type the IP address set up in the “Computer” column and choose the “connect” button. Now, provide your username and password, fill in these details and click “OK.”
Once you are done, you will see Gnome Desktop. Now you have got all the access to the machine on which you have set up the server.
You can install RDP on your mac and start using the remote connection from your Mac device too. For Linux users, you can use RDP clients like Vinagre or Remmina.
Xrdp is an excellent server considering all the benefits and security features. Even setting it up is an easy task. Hopefully, this article has helped you in setting up your server on your local machine. For more such informative articles, bookmark our website.