Skip to content

Instantly share code, notes, and snippets.

@russelldavies
Last active May 7, 2024 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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
snap switch --channel=candidate amazon-ssm-agent
snap refresh amazon-ssm-agent
# 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