Ubuntu – sesman-Xvnc doesn’t connect over xrdp

rdpremote desktop

i'm trying to enable remote desktop on my xubuntu machine with xrdp.

I am on a (pretty much) vanilla xubuntu install. I installed xrdp with apt-get.

My xrdp config looks like this:

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

netstat -ato shows that something is listening on port 3350 at least:

tcp        0      0 localhost:3350          *:*                     LISTEN      off (0.00/0/0)

I am able to connect over port 3389 to the xrdp screen, where I choose the sesman-Xvnc option, and enter my username and password. The Connection Log window then comes up saying

connecting to sesman ip 127.0.0.1 port 3350

Then it sits there forever. I am able to click the OK button and exit at any time.

Why doesn't it connect?

Best Answer

Ugh. Somehow, I never realised that localhost wasn't immune to the firewall.

I added an iptables rule for the localhost interface, and now it works.

iptables -A INPUT -p tcp -m multiport --destination-ports 3350 -i lo -j ACCEPT

In the future I'll use this rule to make sure all localhost traffic is allowed:

iptables -A INPUT -p tcp -i lo -j ACCEPT
Related Question