Comment on Is it possible to run a reverse proxy only on a specific service or port?
foster@lemmy.fosterhangdaan.com 1 month ago
First of all, doesn’t Navidrome have authentication? So, I don’t see why exposing it to the public is a problem.
Second, some reverse proxies support basic auth. This way, you can have authentication at the proxy level and is useful of the service does not support it. Here as an example snippet for Caddy:
example.com { basic_auth { # Username "Bob", password "hiccup" Bob $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG } reverse_proxy myservice:8000 }
You’ll have to look up the docs for other reverse proxies.
FarraigePlaisteach@lemmy.world 1 month ago
Thanks. You’re right shout Navidrome supporting authentication. I’m using HTTP instead of HTTPS, though. I was advised to use a reverse proxy to avoid potential legal issues.
maxwellfire@lemmy.world 1 month ago
How will a reverse proxy help?
Things that a reverse proxy is often used for:
Do any of these match what you’re trying to accomplish? What do you hope to gain by adding a reverse proxy (or maybe some other software better suited to your need)?
FarraigePlaisteach@lemmy.world 1 month ago
Thank you for the very informative reply.
The HTTP and Gemini services are for vintage clients, but I would like the reverse proxy to keep my media collection private (and maybe SSH and SMB too). So I’m serving to modern clients in the case of reverse proxy. I was told that port forwarding is no longer considered secure enough and that if my media gets publicly exposed I could be liable for damages to license holders.
maxwellfire@lemmy.world 1 month ago
Reverse proxies don’t keep anything private. That’s not what they are for. And if you do use them, you still have to do port forwarding (assuming the proxy is behind your router).
For most home hosting, a reverse proxy doesn’t offer any security improvement over just port forwarding directly to the server, assuming the server provides the access controls you want.
If you’re looking to access your services securely, then what you want is a VPN (for vpns, you also often have to port forward). Now, there’s a problem because companies have completely corrupted the normal meaning of a VPN with things like nordvpn that are actually more like proxies and less like VPNs. A self hosted VPN will allow you to connect to your hone network and all the services on it without having to expose those services to the internet.
In a way, VPNs often function in practice like reverse proxies. They both control traffic from the outside before it gets to things inside. But deeper than this they are quite different. A reverse proxy controls access to particular services. Usually http based and pretty much always TCP/IP or UDP/IP based. A VPN controls access to a network (hence the name virtual private network). When setup, it shows up on your clients like any other Ethernet cable or WiFi network you would plug in. You can then access other computers that are on the VPN, or given access to to the VPN though the VPN server.
The VPN softwares usually recommended for this kind of setup are wireguard/openvpn or tailscale/zerotier. The first two are more traditional VPN servers, while the second two are more distributed/“serverless” VPN tools.