I have a list of around 100 IPs which I need to block through Network ACL to prevent connection to EC2 instance on ssh port. Instead of adding each IP one by one, I am looking to copy paste or upload as a file.
CodePudding user response:
There is a soft limit of 20 rules (inbound and outbound combined) and a hard limit of 40 rules per NACL, which would be a show-stopper in your case (as your requirement is to have 100 IPs, unless those could be combined within a range) Thus I would recommend you to look for other options (rely only on Security Groups that are allowing ash access only from certain IPs) or look into AWS Network Firewall.
To directly answer your question, there is no way for bulk upload of NACL rules in the AWS console, but it should be possible to loop over a list of IPs with an AWS SDK of your preference.