+++ title = "Security" description = "Security Docs" keywords = ["grafana", "security", "documentation"] type = "docs" [menu.docs] name = "Security" identifier = "security" parent = "admin" weight = 2 +++
If you have non-Grafana web services running on your Grafana server or within its local network, these may be vulnerable to exploitation via the Grafana data source proxy.
To prevent this type of exploitation from happening we explain a couple of different solutions below.
You can configure Grafana to only allow certain IP addresses/hostnames to be used as data source url and by that proxied through the Grafana data source proxy. See data_source_proxy_whitelist for usage instructions.
You should be able to configure a firewall, for example using iptables, to restrict Grafana from making network requests to certain internal web services.
You should be able to require all network requests being made by Grafana to go through a proxy server.
Important to understand that users with Viewer role can still issue any possible query to all data sources available in the organization. Not just the queries that are defined on the dashboards the user with Viewer role has permissions to view.
There are a couple of ways you can restrict data source query access: