By zenhob
I’ve created a droplet and firewall config (using terraform) from the docker-18-04
and docker-20-04
images and I am unable to perform any DNS resolution from within these hosts. I’ve opened 53/tcp and 53/udp outgoing in the DO firewall, and tried opening them using UFW on the host as well just in case, with no luck. What else would interfere with DNS resolution from within a newly created droplet?
Just in case it helps, this is what the relevant part of the config looks like in terraform:
resource "digitalocean_droplet" "cafe" {
image = "docker-20-04"
name = "cafe"
region = "sfo2"
size = "s-2vcpu-4gb"
private_networking = false
monitoring = true
ssh_keys = [
digitalocean_ssh_key.hal.fingerprint
]
}
resource "digitalocean_firewall" "cafe" {
name = "cafe"
droplet_ids = [ digitalocean_droplet.cafe.id ]
inbound_rule {
protocol = "tcp"
port_range = "22"
source_addresses = var.vpn_source_addrs
}
inbound_rule {
protocol = "tcp"
port_range = "443"
}
inbound_rule {
protocol = "icmp"
}
outbound_rule {
protocol = "tcp"
port_range = "53"
}
outbound_rule {
protocol = "udp"
port_range = "53"
}
outbound_rule {
protocol = "icmp"
}
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
It’s actually a problem with all outgoing traffic, I’ve rewritten the question: https://www.digitalocean.com/community/questions/droplets-created-with-terraform-have-no-outgoing-network-access
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.