CasualRambo
Cadet
- Joined
- Apr 2, 2017
- Messages
- 3
These posts were originally posted on the FreeNAS subreddit, I'm copying them here with the hope of reaching more people.
POST1
My FreeNAS machine is currently running Transmission, Plex, Sickrage and Couchpotato and I want to be able to access those services securely from outside of my network. I know I can setup https and password protect all of them but that is is not enough for me. I tried manage-this and I didn't like the fact that it lacks solid authentication and the services have to be externally visible in order to be accessible via manage-this. I implemented a simple (ugly) web interface with solid authentication and session management mechanisms (I used nodejs, express,angularjs and mongodb) but now I have the same problem that I had with manage-this: services have to be externally visible to be accessible from the outside. I tried pointing the iframes to private IPs but, of course, in order to be able to access them from the outside I need a VPN connection to my network. I asked a friend of mine how can I solve the problem and he said that I need a reverse proxy or some kind of clever network interface loopback setting, both of which are totally new topics to me. Does anybody ever had my same needs? Can anybody help with material I can check out or with different ideas?
After this I found a guide on this very forum on how to create a reverse proxy with nginx but new problems arised
POST2
I found this guide HOW-TO: Set up NGINX to reverse proxy your jails w/ Certbot which seemed to be perfect for my case but I didn't realize that having nginx in front of nodejs would just let anyone type www.mydomain.com/plex and completely bypass my wonderful, state-of-the-art login mechanism :/ Any idea on how to have it running BEHIND nodejs? The only idea I have now is:
POST1
My FreeNAS machine is currently running Transmission, Plex, Sickrage and Couchpotato and I want to be able to access those services securely from outside of my network. I know I can setup https and password protect all of them but that is is not enough for me. I tried manage-this and I didn't like the fact that it lacks solid authentication and the services have to be externally visible in order to be accessible via manage-this. I implemented a simple (ugly) web interface with solid authentication and session management mechanisms (I used nodejs, express,angularjs and mongodb) but now I have the same problem that I had with manage-this: services have to be externally visible to be accessible from the outside. I tried pointing the iframes to private IPs but, of course, in order to be able to access them from the outside I need a VPN connection to my network. I asked a friend of mine how can I solve the problem and he said that I need a reverse proxy or some kind of clever network interface loopback setting, both of which are totally new topics to me. Does anybody ever had my same needs? Can anybody help with material I can check out or with different ideas?
After this I found a guide on this very forum on how to create a reverse proxy with nginx but new problems arised
POST2
I found this guide HOW-TO: Set up NGINX to reverse proxy your jails w/ Certbot which seemed to be perfect for my case but I didn't realize that having nginx in front of nodejs would just let anyone type www.mydomain.com/plex and completely bypass my wonderful, state-of-the-art login mechanism :/ Any idea on how to have it running BEHIND nodejs? The only idea I have now is:
- have nodejs accessibile via HTTPS on port 443 at www.mydomain.com
- have nginx on the same nodejs jail, set on jails' private IP (not accessible from the outside) and reverse proxying to other jails like explained in the guide
- set nodejs route to redirect www.mydomain.com/plex to nginx (private) route to plex private IP
Last edited by a moderator: