Setting up reverse proxy (nginx) with cascaded Router and LTE Modem

lela_tabathy

Dabbler
Joined
Nov 15, 2020
Messages
12
Hi!

I am trying to setup a reverse proxy with nginx so I can access my Nextcloud from the internet and having some trouble with port forwarding in my specific setup.

My setup is as follows:

- FreeNAS 12.2 with Nextcloud installed in a Jail

- Reverse Proxy with nginx setup and running

- mydomain.duckdns.org – I have set up DDNS with DuckDNS and a working Cron Job for updating in FreeNAS

- let's encrypt wildcard certificate for that domain


Now, I'm having some trouble in setting up the proper port forwarding to be able to access Nextcloud.

My network setup:

I have an LTE Router (Alcatel HH40 as far as I can tell) that connects me to the Internet. Via LAN it is connected to the WAN Port on a FritzBox (7581), which is itself connected to my Unifi Switch (24 POE).

The Fritzbox is set to receive the Internet connection from the LTE Router (cascaded) but still function itself as the main Router for the network. So all my devices get their IP from the Fritzbox, so the LTE Router is basically just a modem.

Now I have set up my reverse proxy with the IP adress for my Netxloud jail (192.168.178.2) and I've used the Fritzbox IP as the Resolver IP, as this is in fact my router (192.168.178.1). The ServerName is mydomain.duckdns.org, so my DDNS adress. Nginx is running without errors, so it seems like everything is at least set up properly.

I'm stuck at the point where I have to set the port forwarding in the router, so I can access my Nexcloud jail from the internet via the DDNS domain.

I know how to set up port forwarding in the FritzBox, but I'm unable to establish a connection. In the Fritzbox manual for setting up a separate modem for the internet connection (which I did) it says, port forwarding might not work in this setup.

I have a strong suspicion that is the case here. I have the ability to setup a "Virtual Server" in my LTE Router (looks like this: https://imgur.com/a/0cmzwHv), but I'm not sure if and how this is what I want? Also, is my Resolver actually the LTE Router, not the Fritzbox?

At first I thought I would simply need to open ports 80 and 443 on the LTE Router to my Fritz Box, simply letting everything through and then continuing from there. But I'm not sure that's a good idea and it doesn't seem to work.

I'm hoping someone knows how I need to set this up in my situation. Sorry for the long writeup.
 
Top