2. Your initial router firewall configuration is bypassing Nginx, so, it directly connects into Hypercorn(LNBits)
You say my router firewall is bypassing Nginx. I'm not sure I understand. Sorry.
Do note what @DaveF said:
However, if you have your firewall set to pass traffic from the internet to Hypercorn (port 5000) this entire process falls apart. Since now I can see hypercorn in the world.
Technically; What he means and also I said the word "initial", it pointed to:
config redirect
option dest_port '5000'
option src 'wan'
option name 'lnbits'
option src_dport '5000'
option target 'DNAT'
option dest_ip '192.168.1.153'
option dest 'lan'
option proto 'tcp'
With above config, the internet is directly communicating with Hypercorn. It's because the
dest_port is pointed to Hypercorn port, 5000.
But since you are now using the correct config:
The current and correct internet flow is as described by @HCP.
After reading @DaveF post, I'm not sure I understand this. @DaveF says that internet is passing traffic to Nginx (encrypted) and then Nginx passes it to Hypercorn (unencrypted) and then, Hypercorn passes it back to Nginx again and finally Nginx passes it back to whatever application is listening on that port.
Regarding that, What *I think* he explains is he taking the context of the correct firewall rule config. and it is furtherly explained well by HCP.
Anyway, sometimes I have a hard time to wording and explaining a technical term, so I hope you bear with me
Oh, yes, I got it.
I will double check that my router config is forwarding the traffic to port 5001 and not 5000 by accident.
One more question. This one is not exactly related to the configuration itself but I'll ask it anyway.
You guys know what is the meaning of the following 2 lines in the configuration of my router? What means each one?
and
What means, for instance, if I use 2 different ports there?