Can't connect to EC2 instance no matter what I do.

0

To be clear, I can RDP and everything just fine. I'm writing software for a class that's supposed to communicate to a server. I launched a new EC2 isntance running Windows server and set security rules to allow ALL traffic, inbound and outbound. I have disabled the firewall on both the instance's machine and my machine, and allowed inbound and outbound rules for all ports on both. No matter what, when I check the availability of the ports on the instance, it says they are closed. I have an elastic IP set up on the port, and can easily ping it and get a response, but anything like telnet or ssh are entirely non functional. Also, when I try to test the instance with the software that I am writing, it is not timing out. The instance is actively refusing any connection that it receives. I tried doing user scripts from the AWS documentation to resolve this as well, and nothing has worked. What do I need to do to get this working?

  • are you able to bring up second instance of ec2 in the same VPC and connect from it to your 1st instance?

  • If you writing the .net client server application, assuming you running a server application part on ec2 you trying to connect to? Are you able to verify that there is a process listening on the specific port (using netstat) like Steve Suggested

Nick
asked a month ago411 views
2 Answers
3

I can RDP and everything just fine

and

can easily ping it and get a response

These show that the Windows instance is responding to requests on port 3389 and to ICMP requests.

anything like telnet or ssh are entirely non functional

You wouldn't expect an EC2 instance running Windows to respond to SSH (port 22) or telnet (default port 23), there needs to be a service listening on that port. netstat -aof will show which process(es) are listening on which port(s).

profile picture
EXPERT
Steve_M
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • To go into more detail, I'm writing a server/client program in .NET, and the machine is actively refusing ALL requests i'm making using this program.

  • I'm guessing the server portion is running on the EC2 (as this is the host that you're trying to make connections into). Which port is it listening on?

2

Please verify that there is "server" side of the application that you wrote is running and there is service listening on the specific port you connecting to per previous answer

AWS
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions