This CloudFormation template creates a network ACL with ingress and egress rules to block traffic for specific ports (in this case its RDP port 3389)

CloudFormation Template