Http://domain:3000 error

Grafana is working great when I access it from my internal network http:, it’s fast and stable, but when I try to access with my domain is only work out of my network(with my 4G network). I think is a loopback problem, I saw something about the Grana is not listening loopback. Is there a way to solve this problem ?

That hostname resolves to It is exposed to the entire Internet
for anyone to access - is that really what you want?

Tell us how you are translating that address into

Also, tell us how many different machines you are working with here:

  • is Grafana running on one machine, your router (connecting to the Internet,
    and presumably doing the NAT) is a second, and your browser is on a third, or
    are two or more of any of those functions running on the same machien as each

I think the word “loopback” in your question is quite misleading, because that
woudl refer to the address, which is only accessible from the same
machine, and therefore nothing to do with access from another machine, either
on your local network or across the Internet.


When you access your own domain inside your nat isn’t it a loopback ? Thats is my problem, out of my network is fine the ports are open, but inside my not o only access with http//:
Thanks for help Antony.

When talking about networking, I would only ever use the word “loopback” to
refer to the interface on every machine, which has the IP address

You seem to be asking about connecting from a machine inside your (private)
network to another machine inside the same network, but trying to connect to
it using a public address which exists on the external interface of your

Let me guess what your setup is, and if I’m right, explain what the problem

You are connecting from a machine with a 192.168.1.x address to the public IP, and this public IP address is on the external interface of the
router between your network and the Internet.

That router has been configured to translate into the
internal address, and therefore it sends the packets from
your machine 192.168.1.x to that internal address, where Grafana is running.

The problem is that Grafana sees the source address of those packets as
192.168.1.x, and the network stack on the Grafana machine realises that this
address is in its own local subnet, so it does not send the reply packets back
to the router which did the original NAT, but instead sends the replies
directly back to 192.168.1.x, from its own address

Your machine 192.168.1.x has then sent a request to and got a
reply from

That doesn’t work. Your machine needs a reply from

Assuming that is an accurate guess at your networking setup, what options do
you have to fix this?

  1. Accept that works from the outside but not from the inside,
    and you need to use from the inside. The hostname will not work from the internal network.

  2. Configure your router so that it not only translates the destination address into but also changes the source address to its
    own address (which I might speculatively guess is so that the
    reply packets go back to the router, it can then perform the necessary reverse
    NAT, and send the expected packets back to your machine 192.168.1.x from

  3. Configure a DNS server inside your own network so that it resolves to and therefore you can use the same hostname
    from both internal and external machines, happy that that name resolves to
    different IP addresses in each case, and they both work as required.

  4. Change the netmask on your Grafana server so that instead of being (again, this is a guess, but I’m pretty certain it’s a good
    guess), it is That means it only knows about itself and the
    router, so it will not reply directly to 192.168.1.x, and as in option 2,
    reply packets will go via the router, which will then do the required reverse

  5. Move your Grafana server to an external machine so that it genuinely has a
    public IP address and both you and the rest of the Internet can access it in
    the same way.

  6. Modify the /etc/hosts file on your client machine 192.168.1.x to contain the
    mapping → (this is similar to option 3 but
    slightly simpler to implement) so that you can type the hostname into a
    browser but it gets converted into a local address instead of doing a DNS

However, all of that said, I am going to repeat one of my questions:

The hostname resolves to Grafana is exposed to
the entire Internet for anyone to access - is that really what you want?


1 Like

Thanks Antony now I understand, what you said. The first option is ok for me…Sorry for not answering the quest about expose, but yes, my Grafana is exposed. Is there a problem to use Grafana open to internet ? There is a user and password my measurements are only temps and weather things, in a raspberry that only do this, nothing more. Grafana is a open source project and I hope that’s is secure maybe I’m wrong. Is a bad idea use Grafana like this ? Was not the concept of the project. Sorry, I’am just a newbie in this stuff.

There is no problem in exposing your Grafana server to the Internet so long as
you know that is what you are doing, you trust that you have strong usernames
& passwords, and that any compromise will not result in a leak of sensitive

It sounds as though you are happy with all of these things, so by all means
continue to make this available on a public IP address if that is what you
want to do.