Skip to content

Instantly share code, notes, and snippets.

@russelldavies
Last active June 2, 2024 18:11
Show Gist options
  • Save russelldavies/23cff9fdcd236fc67121bae36e78d4af to your computer and use it in GitHub Desktop.
Save russelldavies/23cff9fdcd236fc67121bae36e78d4af to your computer and use it in GitHub Desktop.
IPv6 bootstrap EC2 instance
#!/bin/sh
# nat64.net NAT64 DNS resolvers
# This can be removed once AWS adds IPv6 DNS records for various services, e.g. SSM
echo 'DNS=2a00:1098:2c::1 2a01:4f9:c010:3f02::1 2a01:4f8:c2c:123f::1\nDomains=~.' >> /etc/systemd/resolved.conf
systemctl restart systemd-resolved.service
# AWS Ubuntu repo doesn't support IPv6 so use default
sed -E -i 's/[a-z]{2}-[a-z]+-[0-9]\.ec2\.//g' /etc/apt/sources.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment