How do make available a HTTP server behind a private network?
I am design a new project and I would like to hear your opinion to avoid a recurrent issue.
Let's start describing the scenario.
From one side, I have several devices, hundreds of PIC32MZ, running own HTTP server that will expose web pages with dynamic contents and settings.
From the other side, there are a few users that connect to those web pages through Internet.
Up to here nothing of special if it weren't for NAT restrictions. In other words, PIC32MZ web server may run behind a private network that will negate external access if not properly configured.
I'm considering pros and cons of different solutions, and I'm open to evaluate other solutions.Solution 1.
Users configure routers to map ports and allow access from Internet (virtual ports, port forwarding, NAT redirect, or whatever name is used).Pros.
Nothing to do at software level.Cons.
Users may be not allowed to change router parameters. Solution 2.
Implement a UPnP request in the PIC32MZ firmware to automatically request a port mapping.Pros.
Transparent to the user.Cons.
The implementation is extremely complicated and some restrictions are even present with not supported routers. Solution 3.
HTTP Proxy or any kind of custom proxy server.Pros.
Semi-transparent to users that instead of using the PIC32MZ IP address will connect to a public facade server.Cons.
I don't know what is the best solution for adapting Harmony web server.
Overall, I think the third solution or something that implements a proxy server although requires a public server (the project has one for other reasons) is the most promising solution at the moment.
But feel free to share your ideas, I probably underrate something.
post edited by Luca Pascarella - 2019/09/17 03:44:22