Download current IP ranges (CIDRs) for AWS cloud infrastructure.
Choose your preferred format. All downloads are permalinks that always provide the latest data.
# Download with curl
curl -O https://cloud-ip-ranges.com/download/aws.txt
# Or download with wget
wget https://cloud-ip-ranges.com/download/aws.txt
# Download and block AWS IPs with iptables
wget -O aws_ips.txt https://cloud-ip-ranges.com/download/aws.txt
while read ip; do
iptables -A INPUT -s $ip -j DROP
iptables -A OUTPUT -d $ip -j DROP
done < aws_ips.txt
# Download and block AWS IPs with UFW
wget -O aws_ips.txt https://cloud-ip-ranges.com/download/aws.txt
while read ip; do
ufw deny from $ip
ufw deny to $ip
done < aws_ips.txt
# Create fail2ban filter for AWS
sudo tee /etc/fail2ban/filter.d/aws-block.conf << EOF
[Definition]
failregex = ^.*$
ignoreregex =
EOF
# Create jail configuration
sudo tee /etc/fail2ban/jail.d/aws-block.conf << EOF
[aws-block]
enabled = true
filter = aws-block
action = iptables-allports[name=aws]
logpath = /tmp/aws_ips.txt
findtime = 1
bantime = -1
maxretry = 1
EOF
# Download IP list and restart fail2ban
wget -O /tmp/aws_ips.txt https://cloud-ip-ranges.com/download/aws.txt
sudo systemctl restart fail2ban
# Create alias table for AWS IPs
# 1. Download the IP list
wget -O aws_ips.txt https://cloud-ip-ranges.com/download/aws.txt
# 2. In pfSense/OPNsense web interface:
# - Go to Firewall > Aliases
# - Create new alias named "AWS_BLOCK"
# - Type: Network(s)
# - Import the downloaded file
#
# 3. Create firewall rule:
# - Go to Firewall > Rules > WAN
# - Add rule: Action=Block, Source=AWS_BLOCK
These IP ranges are sourced directly from AWS's official feeds and are updated regularly to ensure accuracy. The data includes IPv4 and IPv6 ranges used by AWS's infrastructure worldwide. Last update was about 3 hours ago.