The original post: /r/nginx by /u/pmarkandu on 2024-09-21 02:00:35.

Hi everyone. Looking for some advice on setting up an nginx reverse proxy.

I got a Raspberry Pi (RPi) recently to workaround some of my Malaysian government efforts to redirect DNS queries to a centralized government controlled DNS. Loius Rossmann covered this in a video and here is one more article here. The enforcement of that DNS redirection has been overturned for now, but I’m sure it will come back eventually. Hence I am running a Pi-Hole in a docker container, and Unbound directly on the RPi. Got that working after tinkering around for a day. Wasn’t the easiest thing, but I got it to work in the end.

Since I have a RPi, I wanted to set up an nginx reverse proxy to more easily access some of the services (e.g. bittorrent client on my PC, Jellyfin on my PC, my indoor camera, a few more projects I plan to set up on my RPi).

A bit of information:

  1. My ISP does not allow my IPv4 to be addressed. Blocked due to CGNAT (from what I’ve read). My ISP and router does support IPv6. My router also supports DDNS. I use the free asuscomm one provided by Asus and it is tied to my IPv6 address.
  2. I installed Unbound on my RPi directly (not in a docker container). Reason being is that I had some issue installing Unbound as a docker container. I couldn’t get it to work. So my current setup is Router DNS points to 192.168.50.4 (which goes to Pi-Hole) and inside Pi-Hole settings the DNS is set to 172.18.0.1#5335. It works but I don’t know if this is the “right” setup.

So my questions are:

  1. Where should I set up my nginx reverse proxy. Directly on the RPI? In a docker container?
  2. What kind of nginx settings should I be focusing on. I tried to set up a proxy_pass to my torrent client onmy PC but didn’t have much success. Not sure if it’s because it required https:
location /biglybt {
proxy_pass https://192.168.50.2:9092;
}  

  1. Is it possible to support RTSP (Real Time Streaming Protocol) via nginx?

https://preview.redd.it/remq9lwsk2qd1.jpg?width=495&format=pjpg&auto=webp&s=fdf36d500e6681bdbb11fa087508a61a7899af06

Please do advise if I’ve done anything wrong and point me in the direction to get my intended outcome.

I’m no networking expert, so you might have to ELI5 if I respond to you with more questions. Thanks in advance.