EC2 is not responding for ssh connection - amazon-web-services

Another bad day. I have all the configuration for my ec2 instance.
Till yesterday I was able to connect it via ssh on mac. but know why it's not getting connect now.
Configuration is as below:
Security Group:-
I'm using below steps as usual and I'm same directory where mypleaks-inst.pem kept.

My guess: Your security group that was applied was "launch-wizard-2" which by default sets exlusion rules. You need to associate that EC2 instance with one of the two security groups listed in your second screen shot to allow TCP connections on port 22 from inbound ip range. OR you could modify launch-wizard-2 to incorporate the relevant rules to allow for ssh connection.

if you're sure nothing was changed on AWS side then perhaps your SSH service is down temporarily or permanently (the server was overloaded? You can do it with ease with T2.small).
Check NACL and routing, otherwise.

Related

Lost access to Mongo running on Google Cloud VM and can't ssh to it

I have a mongo instance running on a google cloud VM and my application lost access to it overnight. I'm not being able to SSH to it and Cloud console is looking weird.
VM Image: bitnami-mongodb-3-2-1-1-r04-linux-debian-7-x86-64
It first says I don't have permission to access the instance console page. Eventhough I'm the owner of the project and I can see it once I close the modal.
Then when I try to SSH using the built-in SSH tool I first get the following message. I see I have a VPC setup so I'm not really sure if that is actually expected or not.
If I try the alternative method I then get the following:
Does anyone has any hint on what could be the issue?
UPDATE:
VPC Firewall settings are set to allow SSH and the target project is set for it this rule:
I also have an external static IP set for this VM.
Just yesterday I could connect to my mongo instance through port 27017 and it stoped working without touching any GPC configuration.
Based on the information you have provided, it would seem that your GCE VM instance is currently utilizing IAP (Identity-Aware Proxy).
With this in mind, any overviewing the error message you are receiving, it would seem that your firewall rules aren't allowing connections on the SSH port. There should be an ingress rule to allow traffic to the instance on TCP port 22 (SSH) on that VPC network.
Generally, this is automatically created by GCP, on the default network it is typically called "default-allow-ssh", but you can also manually create it in the VPC Network -> Firewall rules tab. Make sure it applies to the instance in question (either through "All targets" or a target tag that matches the instance). You can read more about GCP firewall rules in the documentation.
Likewise, make sure you have an external IP or that you are following one of the options described here.

Remote Desktop Cannot connect to the remote computer for one of these reasons on amazon web services windows instance

I Have set in bound rules to allow all traffic and allow all protocols from all ip's
i was able to connect to the instance via rdp until recently i am unable to connect all of a sudden
I have already set inbound rules to the VPC security group as well as the security group in the EC2 console, and the ACL but my rdp is still not connecting
Go to security groups ->Inbound -> Edit -> Add rule -> select RDP -> in drop down(select anyware ) -> save
First of all there can be multiple reasons why this RDP is not connecting.
You can try to do stop and restart the instance. Sometimes this solves the problem instantly, but sometimes there might be a firewall issue, check your rules.
As you said you have enabled all IPs on all protocols in security
group.
You may also try the troubleshooting steps suggested by AWS.
I have made a video on How to set your Remote Desktop using AWS Ec2 instance. You can refer to this link if it fits your need.
you need to add RDS inbound rule which by default runs on port 3291. Give access permission to Anywhere.

Port 8080 is still closed after adding a TCP custom rule to AWS Security Group

I have been dealing with a very messy problem which is that I need a new open port in my EC2 instance.
I have a node.js application running in this instance. To make that happen I had to open the port 3000 through adding a new inbound rule in the security groups, which worked perfectly.
Now, I need another port opened so I can send data from an external IP to that port.
I tried opening the port adding a new inbound rule as well, but with not success. The port gets opened but just in the localhost, not in the public or private IP, so I can not telnet to the port.
I have tried adding it to the firewall iptables as well using the Ubuntu shell but I have no success on it.
I would really appreciate any help, any response. Thank you!!
I should do comment to get something clear from you but due to low reputation i can't.
So, just ignore reputation or scoring lets consider learning.
Here are complete tutorial to add new ports in an AWS instance:
Open the Amazon EC2 console at EC2 Console
In the navigation pane, choose Security Groups. Select the security
group for your instance.
Choose Inbound, Edit, Add Rule.
For Type, choose choose accordingly.
Now it comes "Secure Filed" it decides that which system can access
this port. So, if you want that only your or some other specific
systems could access this machine give their IPs e.g. in IPV-6
format. Or you want this port open publicly just enter 0.0.0.0 as IP
here.
Choose Save.
Please follow this tutorial, I am sure it would work, in your case I think you are missing "Secure Field" thing.

Why Amazon EC2 is not accessible using ping?

I've been using AWS for a few months without any problem. But from yesterday, I can't access the website. When I ping the IP (52.24.23.108) it displays request time out. Server's status is okay - that I checked from AWS console. Isn't it a network problem of Amazon Webservices?
You need to enable the specified network traffic type (ICMP) through your security groups for your instance. You can do this by choosing Security Groups > select your security group and choose Edit Inbound Rules
Choose "ICMP" from the dropdown and source (* if you want it from everywhere) then Add Rule
PINGs should work!
A couple things could cause this, most likely you provisioned the instance with a public IP, by NOT a n elastic IP. If you had a server restart, either by your doing or by AWS, then your public IP would be dropped. If you did use a elastic IP, then look at your security group to see if you allow icmp still or if the security group changed.
Another cause may be if a server level firewall had been disabled in the past, but if your server went through a restart it may have started again. What base OS are you using?

Amazon Elastic IP issues

I've read a lot of questions already posted on this topic but none seem to provide an answer that helps, so forgive me for the duplicate post if I missed one...
I setup an elastic beanstalk single instance application. I then ensure'd the EC2 instance that it spawned had a security group to allow port 80 incoming requests. I then created an elastic ip and associated the EC2 instance with the ip, but neither the public dns or the elastic ip will respond to http requests.
Any ideas why this might be an issue for me?
In my case the problem was, even though I'd associated my elastic IP to my instance and created firewall rules in new security groups to provide access, I hadn't associated my new security groups with my instance. To fix this, I used the Change Security Groups menu from my Instances screen:
This caused the following popup to appear, where, sure enough, my new security groups existed but weren't associated with my instance:
After I (1) checked the appropriate boxes and (2) clicked on Assign Security Groups, all was well.
In classic-EC2 scenario:
Make sure port 80 is allowed in your AWS security group.
Make sure port 80 is allowed in local operating based firewall on your system. OR disable the local firewall for the time being to narrow down the issue.
Make sure that your application is indeed listening on port 80. You can check this by running telnet 127.0.0.1 80.
If above 3 points are satisfied, I don't see a reason why you are not able to access your application on port 80.
Let us know in case you are using VPC and not classic-EC2.
BTW, when you attach elastic IP, the instance will drop the public DNS that it had earlier. So now you should work with elastic IP only.
I have had a case where the elastic IP address was itself not responding on a specific port number. When I associated the instance with a different elastic IP, everything worked fine. So I resolved the issue by allocating a new elastic IP address. Root cause: Amazon evidently does not have an effective internal process for validating the integrity of an elastic IP. Obviously that's a tall order considering the things outside their control that can happen, with denial of service attacks and etc.
It cost me a day of doing progressive isolation to get to this, which I would have never otherwise suspected.
Any chance there is also a firewall running on the machine? I know in windows I usually need to open the port on the windows firewall AND on amazon's security.