IP Blocking: Use AWS WAF or NACL?

What should you do if you identified a series of malicious attacks on your application coming from a specific IP address? Will you use AWS WAF to block that IP address or create a rule in your Network Access Control List to deny traffic from that IP?

It is true that AWS WAF can filter web requests based on IP addresses, HTTP headers, HTTP body, or URI strings, to block common attack patterns, such as SQL injection or cross-site scripting. NACL, on the other hand, acts like a firewall for controlling traffic in and out of your subnets.

If the scenario is more about protecting your application from common web exploits (SQL injection or cross-site scripting), then AWS WAF would be a more suitable choice. Otherwise, you should choose NACL if it explicitly requires the need to block all traffic based on a given IP address or range.

In real-world scenarios, a hacker will not just use a single IP address to attack you. These guys will just use one IP address after the other. This is why it is difficult to individually block a malicious IP address or range using NACL. If you have a private web application (which is only used within your corporate network), the better solution would be to use a whitelist approach where you only allow authorized IP address/range to access your VPC. For public web applications, using the AWS WAF would be a better choice.

IT Certification Category (English)728x90

Additional Reading Materials:

WAF

NACL

Cheat Sheets on AWS WAF and Amazon VPC:

AWS Training AWS WAF AWS Training Amazon VPC

Note: If you are studying for the AWS Certified Security Specialty exam, we highly recommend that you take our AWS Certified Security – Specialty Practice Exams and read our Security Specialty exam study guide.

Pass your AWS and Azure Certifications with the Tutorials Dojo Portal

Tutorials Dojo portal

Our Bestselling AWS Certified Solutions Architect Associate Practice Exams

AWS Certified Solutions Architect Associate Practice Exams

Enroll Now – Our AWS Practice Exams with 95% Passing Rate

AWS Practice Exams Tutorials Dojo

Enroll Now – Our Azure Certification Exam Reviewers

azure reviewers tutorials dojo

Tutorials Dojo Study Guide and Cheat Sheets eBooks

Tutorials Dojo Study Guide and Cheat Sheets-2

FREE Intro to Cloud Computing for Beginners

FREE AWS Practice Test Samplers

Browse Other Courses

Generic Category (English)300x250

Recent Posts