I have a network, a really basic setup:
The router connects to the ISP, and I have a NAT rule redirecting from a specific port —lets say 4321— to the port 80 on an IP within my network. At this IP I have an Ubuntu server running a web app on Nginx on port 80. Everything works as expected: I can open the browser and give my domain with my port —example.com:4321—, and it will open my web app via http.
Now, I want to set up SSL to connect via https on this web app. To do this I usually use certbot, see an example with Nginx as well here: https://www.digitalocean.com/community/ ... untu-16-04.
The problem is that Certbot requires to access a domain name to set up SSL. But with my NAT rule I'm forwarding only the port, not the domain name, so when the server receives the request it only knows about the port 80, and Certbot returns an error stating that it cant access the resource.
Is there any way to perform NAT redirections on RouterOS while maintaining the domain information of the request?