completely new to Grafana, but at least I got it installed and working nicely with my influxdb.
However, I completely struggle to connect to my dashboard or the login panel from outside through VPN (zerotier). And must admit that I'm an absolute noob when it comes to networking beyond the basics. Grafana runs on a Pi, which connects via ethernet to my router. The Pi has Zerotier installed and I have access to all my other stuff on the machine via VPN. Locally I have full access to Grafana, also from other machines within the same network.
Looking into grafana.log I get this: ''' t=2019-04-10T18:37:51+0200 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/ status=302 remote_addr=xxx.xx.xx.xxx time_ms=1 size=29 referer= '''
IP-address hidden by me. Nothing else to see in the log, which indicates an error or problem.
Since I do have absolutely no clue how to set Grafana in terms of correct network settings, I'm kindly requesting help.
When you access grafana from another machine on the local network what do you put in the browser url? When you try to access it via the VPN what are you putting in the URL and what do you see in the browser?
That is not the normal method of accessing via a vpn, normally that would get you into the local network and you would use the same ip address. At least it is not way my VPN works. However perhaps yours is different. When you said you have access to all the normal stuff via the vpn can you give an example of how you access it using that ip address?
Sorry for late reply. I was not allowed to post another reply for 22 hours.
@ [jordanm](/u/jordanm) Not sure what you mean with VPN interface?
But the Pi has a virtual interface with an ip address assigned from Zerotier. Local ip address on eth0 is 192.168.178.36. The ip address on the virtual interface is 10.147.17.36. And I have access to the machine through VPN, just not to grafana.
That's what I did all the time with the results posted already.
I tried using your proposed command. What happens now is the following:
1. using my mobile phone connected through Wifi to my local network with VPN on (assuming that even the local traffic routes through the VPN then, but could be wrong) 2. I can connect to the Grafana server using 10.147.17.36:4000 in Safari with success 3. tail -f /var/log/syslog shows traffic coming through
4. now I disable VPN and switch Wifi off 5. enable VPN again and try to connect to 10.147.17.36:4000 through mobile network 4G (ipv4) 6. syslog showing: Apr 12 10:07:35 TakuMoe_Open_Pi grafana-server: t=2019-04-12T10:07:35+0200 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/ status=302 remote_addr=10.147.17.35 time_ms=5 size=29 referer= Apr 12 10:07:35 TakuMoe_Open_Pi grafana-server: t=2019-04-12T10:07:35+0200 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login status=302 remote_addr=10.147.17.35 time_ms=42 size=24 referer= 7. but no luck connecting to the grafana. All I see is "Error The request timed out: http://10.147.17.36:4000/" on my mobile browser
Well it looks like the server is receiving and processing the request but it is not being sent to the vpn host. And its very strange that the VPN works while connected to the LAN, but not while accessing it from outside.
To confirm, both Grafana server and VPN server are running on the same host? If NOT, do you have an SNAT rule in your VPN firewall, or an entry in the routing table of your grafana server, to route back to the VPN subnet?
Are you able to connect to any other devices through the VPN? Try testing the address with ping.
Do you have any other rules in your firewall? What is the output of: iptables -L iptables -t nat -L ?
It definitely seems more like a networking issue than a grafana issue.
Yes, Grafana server and VPN (server? I think it's called client..confused) running on the same host. I'm able to connect to any devices which are hosted on the same machine. There is another RasPi in the same LAN, which I cannot reach via VPN. But I think that is normal unless I set up bridge mode at the host running VPN.