# MySQL datasource validation IP address range

**URL:** <https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913>\
**Category:** Grafana\
**Created:** [November 21, 2017, 12:45pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913 "2017-11-21T12:45:47Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastiangrafana](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sebastiangrafana](https://community.grafana.com/u/sebastiangrafana)\
**Post date:** [November 21, 2017, 12:45pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/1 "2017-11-21T12:45:47Z")

</div>

Hello there, I’m trying Grafana Cloud and I want to configure a MySQL source.  
As my DB is hosted in GCP, as a security policy I need to explicitly authorise networks to access it. My question is, is there a way to know what IP ranges will Grafana Cloud use in order to add them and allowing it to query it? (Just in case it’s a MySQL v5.7)

Thanks,

Sebastian.-

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [December 27, 2017, 2:14pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/2 "2017-12-27T14:14:44Z")

</div>

Hi,

The list of source IP addresses in use by hosted grafana is published via DNS answers for [src-ips.hosted-grafana.grafana.net](http://src-ips.hosted-grafana.grafana.net) and at [https://grafana.com/api/hosted-grafana/source-ips](https://grafana.com/api/hosted-grafana/source-ips)

To get the list of IPs you can use the command:

```bash
host src-ips.hosted-grafana.grafana.net | cut -d' ' -f4

```

or

```bash
curl https://grafana.com/api/hosted-grafana/source-ips.txt

```

To get the list of IPs in Json format:

```bash
curl https://grafana.com/api/hosted-grafana/source-ips

```

Marcus

---

<div class="post-metadata">

**Author:** ![peerv](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@peerv](https://community.grafana.com/u/peerv)\
**Post date:** [February 22, 2018, 3:08pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/3 "2018-02-22T15:08:21Z")

</div>

Hi Marcus,  
Can you be more specific on what environment the above commands need to be executed.

The link [https://grafana.com/hosted-grafana/source-ips](https://grafana.com/hosted-grafana/source-ips) gives a 404 error  
Thanks

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [February 22, 2018, 3:26pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/4 "2018-02-22T15:26:19Z")

</div>

Sorry for that. I’ve updated the link.

---

<div class="post-metadata">

**Author:** ![sebastiangrafana](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sebastiangrafana](https://community.grafana.com/u/sebastiangrafana)\
**Post date:** [February 23, 2018, 11:26am UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/5 "2018-02-23T11:26:59Z")

</div>

Hello Marcus, that really did the trick! Thank you for replying. Is there any documentation page that references this? Maybe I missed it but I tried to do some research everywhere before asking.

Thanks!

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [February 23, 2018, 11:30am UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/6 "2018-02-23T11:30:14Z")

</div>

Cool.

We want to publish documentation for Hosted Grafana at our docs site, but we haven’t had time to do that yet.

Marcus

---

<div class="post-metadata">

**Author:** ![peerv](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@peerv](https://community.grafana.com/u/peerv)\
**Post date:** [February 27, 2018, 9:49pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/7 "2018-02-27T21:49:40Z")

</div>

Thanks for the list of IP addresses but bad luck for me.  
Google SQL Cloud platform requires CIDR notation  
No idea how to put this list of seemingly random IP addresses in CIDR notation!  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![dcech](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/dcech/32/49_2.png) [@dcech](https://community.grafana.com/u/dcech)\
**Post date:** [February 27, 2018, 10:02pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/8 "2018-02-27T22:02:21Z")

</div>

For each IP append `/32` for CIDR notation, eg `35.184.81.190/32`

---

<div class="post-metadata">

**Author:** ![sebastiangrafana](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sebastiangrafana](https://community.grafana.com/u/sebastiangrafana)\
**Post date:** [February 27, 2018, 10:08pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/9 "2018-02-27T22:08:46Z")

</div>

What I had to do is using /16 ips with the ranges so I didn’t have to add one by one. Pretty annoying but it worked. So if the IP is: 192.168.10.10 I put [192.168.0.0/16](http://192.168.0.0/16).

---

<div class="post-metadata">

**Author:** ![peerv](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@peerv](https://community.grafana.com/u/peerv)\
**Post date:** [February 28, 2018, 2:14pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/10 "2018-02-28T14:14:39Z")

</div>

For the time being i am just using test data so I authorized Google Cloud SQL as 0.0.0.0/0

Is it an idea for Hosted Grafana to give each user instance its own IP address?  
That is what Google Cloud SQL does.  
Thanks

---

<div class="post-metadata">

**Author:** ![hinger](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hinger](https://community.grafana.com/u/hinger)\
**Post date:** [February 28, 2018, 5:03pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/11 "2018-02-28T17:03:08Z")

</div>

> [@peerv](#):
>
> Is it an idea for Hosted Grafana to give each user instance its own IP address?
> 
> That is what Google Cloud SQL does.

since that is what google cloud SQL does then i do think that this is a good idea indeed. or someone has some better ideas?

---

<div class="post-metadata">

**Author:** ![tasp](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tasp](https://community.grafana.com/u/tasp)\
**Post date:** [September 17, 2018, 6:02pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/12 "2018-09-17T18:02:23Z")

</div>

Hey all, I’m also trying to connect to a CloudSQL instance, and had a month or so of success whitelisting the IPs (which is not ideal, but seemingly the only way to connect to GCloud).

All of a sudden, connections are timing out again and I’m thinking there are new IP addresses / removed IPs.

Is there any place to get notified of new IPs getting added for the Hosted Grafana product?

---

<div class="post-metadata">

**Author:** ![sebastiangrafana](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sebastiangrafana](https://community.grafana.com/u/sebastiangrafana)\
**Post date:** [September 18, 2018, 9:03am UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/13 "2018-09-18T09:03:18Z")

</div>

Hey @tasp, check out my [comment above](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/9?u=sebastiangrafana) to configure it with less strict constraints for the source IPs. It’s not the best solution security-wise (you could be potentially whitelisting IPs not belonging to grafana), but at least will give you some flexibility with these cases. Since I configured it more than 6 months ago I never had a problem.  
Hope that helps!

---

<div class="post-metadata">

**Author:** ![dcech](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/dcech/32/49_2.png) [@dcech](https://community.grafana.com/u/dcech)\
**Post date:** [September 18, 2018, 10:20pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/14 "2018-09-18T22:20:39Z")

</div>

There were some new nodes added to the clusters that were not properly reflected in the src-ips, that has been taken care of and the list is accurate once again.

---

<div class="post-metadata">

**Author:** ![dmnldev](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dmnldev](https://community.grafana.com/u/dmnldev)\
**Post date:** [January 4, 2019, 10:42am UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/15 "2019-01-04T10:42:41Z")

</div>

@dcech The following IP is currently missing from the txt file, JSON file and DNS entries: 104.197.240.76

---

<div class="post-metadata">

**Author:** ![anon14598068](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@anon14598068](https://community.grafana.com/u/anon14598068)\
**Post date:** [January 4, 2019, 3:48pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/16 "2019-01-04T15:48:02Z")

</div>

Sorry about that, I recently scaled up the cluster and forgot to update the src-ips record. I just updated it, so please let me know if you continue to have any problems.

---

<div class="post-metadata">

**Author:** ![brachipa](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@brachipa](https://community.grafana.com/u/brachipa)\
**Post date:** [May 7, 2019, 1:49pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/17 "2019-05-07T13:49:17Z")

</div>

Is this IPs list same for all organizations?  
How can I get my own organization ip range?

---

<div class="post-metadata">

**Author:** ![joaocorreia](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/joaocorreia/32/9348_2.png) [@joaocorreia](https://community.grafana.com/u/joaocorreia)\
**Post date:** [January 23, 2020, 8:36am UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/18 "2020-01-23T08:36:05Z")

</div>

This is so lame from Grafana, you should have a couple exit IP addresses not like 100!

---

<div class="post-metadata">

**Author:** ![multiconnect](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@multiconnect](https://community.grafana.com/u/multiconnect)\
**Post date:** [March 9, 2020, 4:24pm UTC](https://community.grafana.com/t/mysql-datasource-validation-ip-address-range/3913/19 "2020-03-09T16:24:23Z")

</div>

Had to add 35.222.247.55 in my firewall for it work. Would be awesome to have a list that is authoritative.
