fork my brewpi/www repository (the only changes I have made are to enable authentication) https://github.com/nzjoel1234/brewpi-www
â this will create a new repository in your github account
clone your new repository to your RPi (instead of the âmainlineâ code)
That will break updates though, since the default remote is not BrewPi anymore.
Sorry Joel, have not had time to take a good look at your repo yet and I am not very knowledgable in PHP security. I have asked @ajt2 to look at it, but he has been busy too.
In order to remote access the BrewPi over the internet I would strongly suggest an SSH tunnel.
This is the only way I use in order to access my LAN resources (e.g my NAS) even if my devices support the âcloudâ option, which I always disable for security reasons.
The idea is using an SSH client (putty for windows, ConnectBot for android or whatever) to forward all traffic coming to a specified port on the client, to a specified port on the server. It sound âtrickyâ but it is actually very easy to accomplish.
I would give generic guidelines not a detailed guide.
Setup a DDNS service on your router. I use NO-IP. If your router does not have this option, use the RPi. Refer to âSetting up Raspberry Pi Dynamic DNSâ @ https://pimylifeup.com/raspberry-pi-port-forwarding/
Copy the contents of the public key to the .authorized_keys found at the RPiâs SSH folder. Restart SSH server.
Using Putty enter the DDNS address as the destination you want to connect to and then go to SSHâ>Tunnels. Choose a Source port number (e.g 4321) and fill the Destination field with the address of the BrewPi interface. Under SSHâ>Auth enter the location of your authentication key. Under Connectionâ>Data set the Auto-login username field with root. Save the session using a name of your choice and click open.
Hopefully you will be connected to RPiâs SSH server. Now open the browser and enter 127.0.0.1:âportâ where port is the Source port you chose at 4., e.g 127.0.0.1:4321
And Voila! You can access the BrewPi securely over the internet.
Sorry for the coarse guide but in my setup I have both DDNS and SSH server on the router (a DD-WRT compatible router) and I am using ConnectBot for android as an SSH client, so I can not provide right now more details or a step-by-step guide for the setup. I thought that a thoroughly explanation of my setup would not be useful for most of you because it is very specific.
In case you find the above interesting, I could find some time and broaden the guide in the future.
Guys, get a router/modem (or check the one you have) which supports a VPN (either SSL or IPsec), even better if it supports come kind of Dynamic DNS too. Either that or repurpose an old PC and use IPfire, Pfsense, etc to build a real firewall.
I know Elco is a talented guy, but Iâm guessing security is not his main concern so I wouldnât put the web server directly on the Internet via port forwarding even with the dummy page.
Then you can connect from your phone, tablet or PC in the knowledge that your connection is 100% secure, and your web server and your beer are safe from tampering.