I'm new here and I've just installed and configured xRDP and XFCE4 on my Ubuntu 16 server so I can Remote Desktop from my Windows PC. Faizan Akram Dar's answer worked perfectly! Then I installed an open VPN server and followed the recommendations to activate the UFW firewall. And so the Remote Desktop no longer worked. I solved it by adding to the the UFW rules the whole IP range of my router's DHCP service and the 3389 port.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
sudo ufw allow 3389
However, I was wondering if there is a way to set up a more restrictive rule for this purpose.
Thank you!