Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure AWS ELB to block certain IP addresses? (known spammers) [closed]

I am looking for a way to drop connections from known spam ip addresses on an Amazon's Elastic Load Balancer (ELB)?

I am currently doing this at the web server level (multiple instances, running behind the ELB), but wondering if there is a way to do it at the ELB. This way, I can avoid configuring each web server instance for this.

I typically pull the Drop List from Spamhause.org every day and update my web server configuration

like image 261
Litmus Avatar asked Nov 21 '13 14:11

Litmus


People also ask

Is there a way to blacklist IPs in AWS?

To allow or block specific IP addresses for your EC2 instances, use a network Access Control List (ACL) or security group rules in your VPC. Network ACLs and security group rules act as firewalls allowing or blocking IP addresses from accessing your resources.

Which product will be used if you want to block an IP address reaching to your server?

The IP Deny tool in the MyKinsta dashboard lets you block both individual IP addresses as well as IP address ranges without having to edit web server configuration files. If you're hosted on Kinsta, the IP Deny tool is the recommended method for blocking IP addresses.


1 Answers

I would try using VPC ACLs for that. First of all, ELBs inside VPC can use Security Groups but they only specify a traffic you allow in and out of an ELB. To actually block a traffic coming from a certain IP - an ACL would be the best.

For that to work - a pair of a public (internet-facing) and internal ELBs need to be used with internal ELB protected by subnet ACL DENY rules.

like image 177
Evgeny Goldin Avatar answered Oct 05 '22 23:10

Evgeny Goldin