Docker Community Forums

Share and learn in the Docker community.

OpenVPN-Client and Nginx-Proxy-Manager in Docker

Hello, I have a real problem with my installation. There is my setup :

  • I have Docker installed with Portainer
  • 2 Containers installed : dperson/openvpn-client and jlesage/nginx-proxy-manager

I want to pu my Nginx-Proxy-Manager container in the OpenVPN-Client container network. So, I have my OpenVPN-Client container connected to my VPN and with the following port configuration 4443/tcp

:::443 4443/tcp 51413/tcp

:::51413 51413/tcp 8080/tcp

:::80 8080/tcp 8181/tcp

:::81 8181/tcp 9091/tcp

:::9091 9091/tcp

So here I am redirecting ports 80, 81 and 443 to ports 8080, 8181 and 4443 which correspond to the ports used by jlesage/nginx-proxy-manager. I have access to the NPM interface (Nginx-Proxy-Manager) via my ip and port 81 (normally 8181 but as you can see above I have redirected from port 81 to 8181). Except the problem is, it doesn’t work. When I try to create an SSL certificate I get the error “INTERNAL ERROR” and in the log I have this:

ERROR:certbot._internal.log:Some challenges have failed.

The log is very long so I don’t put everything. In short, we get the impression that NPM does not take into account the redirection from port 443 to port 4443 located in the OpenVPN-Client container. I mean it like that, but that’s probably not the problem. I’m testing something else, create a Proxy Host in NPM with “Domain Names” as my public ip (from my VPN) which redirects to my NPM ip just for testing. Thus, we are already testing whether port 80 works without paying attention to SSL. So when I search for my public ip, I got an error: 80.XX.XX.XX refused the connection. So the problem is that port forwarding doesn’t seem to work …

What is strange is that if I put OPENVPN-Client directly in debian and not in a docker, and I install NPM from jlesage saying that port 80 goes to 8080, the same goes for port 443 to 4443 and port 81 to 8181, it works even with SSL which generates correctly. Except that I want OpenVPN-Client to be in a container.

I absolutely do not see where the problem could come from, knowing that on my VM with OpenVPN-Client installed under debian and NPM in docker it works. Why putting OpenVPN-Client in a container doesn’t work. The worst is that in the container of my NPM, if I type:


I have the IP of my VPN, so NPM recognizes that it is on the network of my OpenVPN-Client container

Thanks for the help I’m desperate :sob: