$ sudo netstat -plnt | grep rdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 83971/xrdp-sesman
As you can see xrdp is not listening on port 3389.
$ tail -f /var/log/syslog
May 3 04:19:36 vmName systemd[1]: Starting LSB: disk temperature monitoring daemon...
May 3 04:19:36 vmName systemd[1]: Started LSB: disk temperature monitoring daemon.
May 3 04:19:37 vmName systemd[1]: Reloading.
May 3 04:19:37 vmName systemd[1]: Started ACPI event daemon.
May 3 04:19:37 vmName systemd[1]: Reloading.
May 3 04:19:37 vmName systemd[1]: Started ACPI event daemon.
May 3 04:19:37 vmName systemd[1]: Reloading.
May 3 04:19:37 vmName systemd[1]: Started ACPI event daemon.
May 3 04:24:08 vmName start_jupyterhub.sh[2210]: 04:24:08.613 [ConfigProxy] #033[32minfo#033[39m: 200 GET /api/routes
May 3 04:24:08 vmName start_jupyterhub.sh[2210]: [I 2020-05-03 04:24:08.613 JupyterHub proxy:319] Checking routes
May 3 04:29:08 vmName start_jupyterhub.sh[2210]: 04:29:08.613 [ConfigProxy] #033[32minfo#033[39m: 200 GET /api/routes
May 3 04:29:08 vmName start_jupyterhub.sh[2210]: [I 2020-05-03 04:29:08.613 JupyterHub proxy:319] Checking routes
$ telnet PUBLIC_IP 3389
Trying PUBLIC_IP...
telnet: Unable to connect to remote host: Connection refused
$ sudo systemctl status xrdp
● xrdp.service - LSB: Start xrdp and sesman daemons
Loaded: loaded (/etc/init.d/xrdp; bad; vendor preset: enabled)
Active: active (running) since Sun 2020-05-03 04:05:37 UTC; 14min ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/xrdp.service
└─83971 /usr/sbin/xrdp-sesman
May 03 04:05:37 vmName systemd[1]: Starting LSB: Start xrdp and sesman daemons..
May 03 04:05:37 vmName xrdp[83956]: * Starting Remote Desktop Protocol server
May 03 04:05:37 vmName xrdp[83956]: ...done.
May 03 04:05:37 vmName systemd[1]: Started LSB: Start xrdp and sesman daemons.
I am trying to make an rdp connection to my linux vm on azure cloud. I am able to connect through ssh as you can see above. The NSG(firewall) is allowing this port, but the rdp is not listening to this port.
Here is some part of the output of:
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere multiport dports 3853
ACCEPT tcp -- anywhere anywhere multiport dports 3853
...
ACCEPT tcp -- anywhere anywhere multiport dports ldap
ACCEPT tcp -- anywhere anywhere multiport dports 3389
ACCEPT tcp -- anywhere anywhere multiport dports 3389
...
ACCEPT tcp -- anywhere anywhere multiport dports ldap
ACCEPT tcp -- anywhere anywhere multiport dports ldap
...
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere multiport dports 3853
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target prot opt source destination
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere