Docker network log outgoing traffic?

Viewed 433

I have a docker-compose workload that is allowed to make some external network requests, but should not connect to domains outside an allowlist.

Is there a good way to

  1. log what domains my container(s) are connecting to
  2. block domains that are not on an allowlist (but still log them)

tcpdump looks like it can log what ipaddrs my containers are trying to connect to, but for hostnames relies on ambiguous reverse domain name lookups; can we log the DNS lookups instead? tcpdump also doesn't let me block non-allowlisted domains.

0 Answers
Related