Skip to content

AMI from a domain-joined EC2 Windows

0

I created security group with no outbound rule. The new ec2 which is getting created on which sysgrep is to be done is not allowing login. It says logon faile. NLA authentication error

asked 20 days ago69 views

2 Answers
0

Cause 1 (Most likely): An AMI is being created directly from a domain-joined instance without running Sysprep.

Solution:

When creating a new AMI, remove the source instance from the domain and run Sysprep before creating the AMI. Alternatively, we recommend using a tool like Amazon EC2 Image Builder and modifying your design so that domain joining occurs dynamically after instance launch—using EC2Launch v2 or UserData scripts (keeping the "Golden AMI" itself in a non-domain-joined state is a best practice).

Cause 2: A security group with no outbound rules is completely blocking communication with the Domain Controller (DC).

Solution: Add outbound rules to allow traffic to the Domain Controller on at least the following ports:

PortProtocolPurpose
53TCP/UDPDNS
88TCP/UDPKerberos authentication
389TCP/UDPTCP/UDP
445TCPSMB
464TCP/UDPKerberos password change
3268-3269TCPGlobal Catalog (if required)

answered 20 days ago

EXPERT

reviewed 20 days ago

0

Few points to check

  1. SG by default blocks all inbound traffic. So please enable inbound traffic to allow login to instance.
  2. SG by default allow outbound traffic as SG is stateful way to protect your instances

answered 19 days ago

  • I have allowed RDP 3389 inbound rule. I have removed all outbound rules as instructed in the documentation link that I shared

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.