I accidentally disabled network connectivity to my Amazon EC2 Windows instance. How do I fix it?

3 minute read
0

I accidentally disabled network connectivity in Windows. Now, I’ve lost connection to my Amazon Elastic Compute Cloud (Amazon EC2) Windows instance. How can I fix this?

Resolution

Method 1: Use the EC2 Serial Console

If you enabled EC2 Serial Console for Windows, you can use it to troubleshoot supported Nitro-based instance types. The serial console helps you troubleshoot boot issues, network configuration, and SSH configuration issues. The serial console connects to your instance without the need for a working network connection. You can access the serial console using the Amazon EC2 console or the AWS Command Line Interface (AWS CLI).

Before using the serial console, grant access to it at the account level. Then create AWS Identity and Access Management (IAM) policies granting access to your IAM users. Also, every instance using the serial console must include at least one password-based user. If your instance is unreachable and you haven’t configured access to the serial console, then follow the instructions in Method 2: Create a temporary elastic network interface. For information on configuring the EC2 Serial Console for Linux, see Configure access to the EC2 Serial Console.

Method 2: Create a temporary elastic network interface

You can create a temporary elastic network interface, and attach the network interface to the Amazon EC2 Windows instance. Then, you can temporarily connect to the instance and fix the issue.

  1. Open the Amazon EC2 console, and then choose Instances from the navigation pane.
  2. Select your instance. From the Description tab, make a note of the Subnet ID.
  3. Create a new network interface in the same subnet as the instance.
    Important: Be sure to select a security group that allows incoming Remote Desktop Protocol (RDP) traffic from your IP address.
  4. Attach the new network interface to the instance.
    Note: The network interface might take a few minutes to come online. If you connect to the instance using RDP, associate an Elastic IP address with the network interface.
  5. Using the new network interface, connect to the instance using RDP.
  6. Change the network connection settings in Windows to use DHCP. Or, specify the correct private IP address settings. For instructions, see Configure a secondary private IPv4 address for your Windows instance.
  7. Detach the temporary network interface.
    Note: If you associated an Elastic IP address with the network interface but no longer need the Elastic IP address, release the Elastic IP address.

Related information

Troubleshoot EC2 Windows instances

AWS OFFICIAL
AWS OFFICIALUpdated 3 years ago