xrdp installation on CentOS 7

xrdp installation on CentOS 7

Prerequisites

1. First, install Gnome GUI on CentOS 7 / RHEL 7

2. xrdp is available in EPEL repository, Install and configure EPEL repository

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Install xrdp on CentOS 7

Use YUM command to install xrdp package on CentOS 7 / RHEL 7

yum -y install xrdp tigervnc-server

Once xrdp is installed, start the xrdp service using the following command

systemctl start xrdp

xrdp should now be listening on 3389. Confirm this by using netstatcommand

netstat -antup | grep xrdp

Output:

tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1508/xrdp
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1507/xrdp-sesman

By default, xrdp service won’t start automatically after a system reboot. Run the following command in the terminal to enable the service at system startup

systemctl enable xrdp

Firewall

Configure the firewall to allow RDP connection from external machines. The following command will add the exception for RDP port (3389)

firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload

SELinux

Configure SELinux

chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman

Check xrdp Remote Connectivity

Now take RDP from any windows machine using Remote Desktop Connection. Enter the ip address of Linux server in the computer field and then click on connect

 

check rdp from windows to linux
check rdp from windows to linux