3

I've set up an Amazon EC2 instance. I allowed RDP from any ip in the security groups, installed and started xrdp and added a user with a new password.

However when I try to remote connect, the connection simply fails.

Does anyone have any experience with this that could point me in the right direction?

Edit: How I set it up

sudo aptitude update
sudo aptitude install ubuntu-desktop 
sudo aptitude install xrdp
sudo /etc/init.d/xrdp start
sudo adduser USERNAME
sudo adduser USERNAME sudo

Then I set my EC2 Security group to be:

Type        Protocol    Port Range  Source
All TCP     TCP         0 - 65535   0.0.0.0/0
SSH         TCP         22          0.0.0.0/0
HTTP        TCP         80          0.0.0.0/0
RDP         TCP         3389        0.0.0.0/0
All ICMP    All         N/A         0.0.0.0/0

Edit 2: More details, for Yaron

I have not set up iptables. My netstat output, with my ssh hostname changed

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 ip-10-85-146-191.e:3389 host163-5-static.2:2006 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 host163-5-static.2:1169 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 host163-5-static.2:2087 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 173.244.215.194.s:48345 ESTABLISHED
tcp        0    256 ip-10-85-146-191.ec:ssh somehostname.:26930 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 66.85.144.237:46267     ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 173.244.206.19.st:42205 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 vps.node70.doip.n:40741 ESTABLISHED
tcp        0      0 ip-10-85-146-191.e:3389 host163-5-static.2:4515 ESTABLISHED
1
  • 1
    you should tell us how you did install xrdp in order to help you
    – kamil
    Jul 2, 2014 at 8:48

1 Answer 1

3

In order to connect to an EC2 instance you'll have to configure a public IP and make sure you add a matching routing table rule.

There are 2 ways of getting a public IP:

  1. Adding a randomly selected IP during the instance set up (just tick the required V on the third screen).
  2. Adding an Elastic IP from the Elastic IP section on the left (this method does not require a new machine, you can attach this IP to your machine with no hassle).

Now you'll need to configure the routing table.

First go to the VPC section, click the Internet Gateway link and add a new gateway attached to your VPC.

Now click the Routing Tables link and add a routing table rule to forward the traffic to 0.0.0.0/0 to this igw (the list will pop up and this will probably be the only option).

Good luck, Yaron.

2
  • I do have a public IP. I actually already host a personal website, a wiki and some wordpress blogs on this server, so getting to it externally generally works. It's just the rdp that doesn't.
    – Feasoron
    Jul 2, 2014 at 11:21
  • 1
    Can you please paster the Netstat output? (try -t for TCP only, if you want you can grep only the relevant line). Do you have iptables active?
    – Yaron
    Jul 3, 2014 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .