Docker image for automating IP whitelist of Cloudflare IPs. Created using Rust language.
Cloudflare range of IPs are available under the following links:
Pull the image from ghcr, then create an image alias called aciw:latest
:
docker pull ghcr.io/novalagung/aws-cloudflare-ip-whitelist:latest
docker tag ghcr.io/novalagung/aws-cloudflare-ip-whitelist:latest aciw:latest
Build locally:
docker build . -t aciw:latest
Run:
docker run --rm -v ${HOME}/.aws:/root/.aws:ro aciw:latest <security-group-id> [<ports>, ...]
security-group-id
is the AWS security group ID.ports
is the port that will be whitelisted. Default is set to80
(HTTP port). Specify the port using comma separated or space separated.
docker run --rm -v ${HOME}/.aws:/root/.aws:ro aciw:latest sg-0cff43a33f085df79
docker run --rm -v ${HOME}/.aws:/root/.aws:ro aciw:latest sg-0cff43a33f085df79 80,443
docker run --rm -v ${HOME}/.aws:/root/.aws:ro aciw:latest sg-0cff43a33f085df79 80 443
WARNING! This approach will mount
~/.aws
into docker, and this is not a good practice
MIT License
Noval Agung Prayogo