Not able to rdp to Windows EC2 instance after deleting firewall rules on instance

0

I tried to install python packages from pip on the windows ec2 instance, but I'm getting error:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000012FE96940D0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pip-tools/

For this I was advised to flush the firewall rules on the jnstance, and check if the pip is working. To delete the firewall rules, I executed following syntax:

netsh advfirewall firewall delete rule name=all

As soon as I executed this command, my remote desktop session(initiated using Windows Remote Desktop) got terminated, and now I'm not able to establish the remote desktop session again.

Can anyone please help to understand, how can I rdp to windows instance?

[N.B.: I will really appreciate if any reference on why pip install not be working, can also be shared. I have whitelisted all outbound traffic on security group and network acl(for nacl all inbound traffic has also been whitelisted) on following ip address:

  1. 151.101.0.223/32
  2. 151.101.128.223/32
  3. 151.101.192.223/32
  4. 151.101.192.223/32
  5. 185.199.110.153/32
  6. 185.199.109.153/32
  7. 185.199.111.153/32
  8. 185.199.111.153/32 ]
1 Answer
0

It is very likely that the RDP rules for incoming rules have been deleted.
The firewall must be disabled using AWSSupport-TroubleshootRDP in Systems Manager automation.
The following blog is in Japanese, but does the same thing.
https://qiita.com/handy-dd18/items/282d2150dfa92d446c94

※To use Systems Manager, attach the IAM policy "AmazonSSMMManagedInstanceCore" to the EC2 IAM role.
If your answer leads to a resolution, please approve the answer for the betterment of the community.

profile picture
EXPERT
answered a year 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