Hi,
Please note that I am far from an expert with this matter and apologies if my explanation seems bland, so please let me know if further information is needed and I will happily support!
I wish to view a dashboard (that I made on a windows device) remotely on a Raspberry Pi running Raspberry Pi OS. I have been following this post: Accessing outside of localhost. Following that, I have established an SSH connection between the two devices and I have made Grafana listen on port 443 instead of the local port 3000 and when I run the ânetstat -lptnâ command, its state is on âLISTENâ. I then put the following to the URL of my web browser on the Pi: âhttp:// IP_ADDRESS_OF_WINDOWS_DEVICE :3000 / LINK_TO_MY_DASHBOARDâ however, it says the connection has timed out. Have missed something during the process?
I have downloaded Grafana on both devices and a Grafana account is also set up on the Pi, acting as the remote user using my dashboard.
Do you want to access Grafana on Windows from a remote Raspberry Pi?
Or do you want installa Grafana in a Raspberry Pi and access it from WAN?
I am going to suppose is the second choice. In that case, and to make it the most easy:
Take the Raspberry
Install Raspbian or OS you want
Install a Webserver (Apache or Nginx)
Install Grafana
Export dashboard of Grafana in Windows
Open WAN port to LAN <3000> in your router.
Connect to <Your_WAN_IP:xxxxx>
Setup Grafana, first run.
Import dashboard of Grafana in new instance inside Raspberry.
EDIT:
If you want to see the dashboard of the windows machine, inside a Raspberry, you should do the same, pointing the public IP and port to the local IP and port of Grafana in the windows machine.
EDIT2:
Windows have a firewall, check you accept conection from outside. Try to disable it to make the test.
Thanks for the reply, so I want to use a Raspberry Pi 4 to remotely view a dashboard that I created (and currently running) on a windows computer, therefore I believe it is the first point you made. Also, both the Pi and Windows machine are on the same network.
I have installed Apache on the windows machine and edited the âListenâ on the config file to:
Listen IP_ADDRESS_OF_WINDOWS_DEVICE : 3000
I have also allowed Apache to communicate through the Windows firewall (private and public).
Though, I am confused as to why you said to do the same on the Pi, as in, I have to install Apache on the Pi that is trying to connect to connect to the host too?
Youâll have to configure the Windows firewall to allow incoming connections to Grafana, and since youâve configured Grafana to listen to port 443 youâll have to use http://<ip_address_of_windows_device>:443 as the hostname (if youâre serving it over HTTPS, thatâs the default port and you should be able to access it on https://<ip_address_of_windows_device>, if youâre not you should use port 80 instead).
You donât need Grafana on the Raspberry Pi if you want to access the Grafana dashboard you made on your Windows computer. (or you might want to do the opposite and run Grafana on the Raspberry Pi and connect to it from the Windows computer to edit your dashboards).
So the Raspberry Pi is only a machine to show Grafana, like a main computer more in your LAN network.
So the problem is in the Windows machine, you should focus in it. The port you want to use does not matter. Can you try to disable completely Windows Firewall to check if Grafana is listening at the port you select?
Apologies for the late reply. Disabling Windows Firewall completely wasnât tested but an alternative method to connect the Grafana on Windows to the Pi was made. But iâll remember this and try to disable the firewall completely next time. Thanks for the advice!
HiâŚSo, for a individual VPN you (more often than not) require a VPN server on a known IP address with a harbour open (or harbour sending on a switch) that acknowledges activity from the web, and a VPN client on the Pi. Open VPN can do this. You introduce OpenVPN server on a machine on the ânearbyâ arrange and set the switch to forward the proper harbour to it. At that point you introduce OpenVPN client on the Pi and arrange it to put through to the server. There are parcels of instructional exercises on how to set up openvpn. Itâs not Pi specific. There are other VPNs that can be utilized as well. I utilize one called tinc, which takes a bit of setting up, but is exceptionally adaptable. Itâs not prescribed for fledglings in spite of the fact that.