This script checks if one or more IP address or CIDR block is in an AWS IP range. It uses the AWS IP Ranges JSON file to determine the IP ranges.
python aws_ip_check.py IP [IP ...]
Arguments:
IP
: IP address or CIDR block
-
Python 3.6+
-
Install required packages:
pip install -r requirements.txt
python aws_ip_check.py 192.0.2.1
[
{
"ip_prefix": "192.0.2.0/24",
"region": "us-east-1",
"service": "AMAZON"
}
]