The operating system my web server runs on is (include version):
Ubuntu 18.04 LTS
My hosting provider, if applicable, is:
Amazon AWS
I can login to a root shell on my machine (yes or no, or I don’t know):
Yes.
I am running Boulder in Docker on an AWS instance.
I am able to make incoming network connections from external addresses. For example, from a different AWS instance, I can connect to Boulder and the OCSP Responder on the appropriate ports.
However, I am NOT able to make outgoing connections from Boulder to an external address, … in particular to an AWS RDS instance running MariaDB.
I am not a Docker expert, so I don’t know what changes are required.
Can anyone suggest how to allow processes running inside Docker to access external IP addresses?
I think on most Linux platforms, Docker will use bridge networking and have forwarding enabled on the host. So whatever the Docker host can access, the container should be able to access as well: Bridge network driver | Docker Docs
Can your Docker host communicate with the RDS instance?
Can your Docker container talk to the internet in general, e.g. ping 1.1.1.1?
This doesn’t work for me, and I am puzzled why it worked for you. Any thoughts on why our experiences are different?
I used both the sysctl and iptables commands to enable IP Forwarding.
The ping command works inside the bhsm_1 container (in fact, it already worked before enabling IP Forwarding).
… but ping to an external address still does not work inside the boulder_1 container, with this error:
`ping: example.com: Temporary failure in name resolution`
One of the key differences from the bhsm_1 and boulder_1 containers is this section of the docker-compose.yml:
# Use sd-test-srv as a backup to Docker's embedded DNS server
# (https://docs.docker.com/config/containers/container-networking/#dns-services).
# If there's a name Docker's DNS server doesn't know about, it will
# forward the query to this IP (running sd-test-srv). We have
# special logic there that will return multiple IP addresses for
# service names.
dns: 10.77.77.77
When I comment out the line with dns, I can ping an external address, but the Boulder components are no longer able to talk to each other.