Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit access to target IPs to IP ranges of EC2 servers #1

Open
wants to merge 54 commits into
base: master
Choose a base branch
from

Conversation

mfittko
Copy link
Owner

@mfittko mfittko commented Feb 14, 2023

This PR adds docker configuration files and configuration for deploying the DNS server using pullpreview.

Open Tasks:

  • make the pullpreviews work in this repository (add AWS credentials according to this guideline)
  • parameterise the config file
  • extend the power dns backend file with a function that applies the obtained network IP ranges
  • write a simple smoke test that checks nip.io service after it is deployed using GitHub actions

@mfittko mfittko self-assigned this Feb 14, 2023
#!/usr/bin/env bash

ip_ranges=($(curl -sk https://ip-ranges.amazonaws.com/ip-ranges.json | jq -c '.prefixes[] | select(.region=="eu-central-1" and .ip_prefix and .service == "EC2") | .ip_prefix'))
whitelist=$(for i in "${!ip_ranges[@]}"; do echo "ec2_eu_central_1_$i = ${ip_ranges[$i]}"; done | sed 's/"//g')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use $AWS_REGION env variable. make sure it's available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant