Your web application is getting a suspicious amount of bad requests from foreign IP addresses. Your business is operating in only a few countries and you would like to block any other traffic. What is the best practice for limiting access to your web application by country?

Advertisement

  • Use Web Application Firewall and create a geo match condition to drop all requests from countries that aren’t on your allow list.
  • Use Application Load Balancer to create a new routing rule that looks at source IP address. Add an IP block for the countries that have access.
  • Host the front end of your website in CloudFront and configure a geo restriction on the distribution.
  • Use CloudTrail to monitor the IP addresses of the bad requests. Use Lambda to add these IP addresses to an Application Load Balancer rule that blocks the IPs.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend