Question

Firewall prevents do-agent from pushing monitoring data

I blocked outgoing TCP connections from the web interface (Networking -> Firewall). Only allowed external 3rd party API ip addresses and DNS.

The problem is that do-agent stopped reporting performance metrics. If I allow all IPv4 outgoing connections everything works fine. But I would like to only premit certain IP addresses for security reasons.

Do you know which IP address do I need to whitelist for do-agent to resume working?


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

The DigitalOcean Monitoring agent requires outbound TCP access on ports 80 and 443 to authenticate to the Monitoring service and to send metrics.

The agent need to be able to access the DigitalOcean metadata API at: http://169.254.169.254/metadata/v1/ as well as the metrics service itself at https://sonar.digitalocean.com. Additionally, in order to allow the agent to update its self https://repos.sonar.digitalocean.com

Unfortunately, the IP addresses behind those domains are not guaranteed to be stable. In particular, the repo for automatic updates is backed by an external CDN.

You can find their current IP addresses using: dig +short sonar.digitalocean.com and dig +short repo.sonar.digitalocean.com on the command line.

Here is a currently working example:

Example firewall

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.