Home > Back-end >  How to connect webserver securely with azure gateway?
How to connect webserver securely with azure gateway?

Time:10-06

I have a azure VM, which hosts nginx and have custom domain & SSL configured. Eg. https://customdomain.com which displays nginx default page. In this azure VM, all inbound ports are blocked except 443 port, even this port is access to limited ip's only.

My requirement is to access this URL: https://customdomain.com through azure vpn gateway without adding my ip in 443 port in NSG.

what i did was, i created an azure vpn gateway and configured point to site configuration and i have connected to vpn and trying that URL, its not working but when i put private ip in the browser its actually working but it is insecure.

So how can i make this URL https://customdomain.com working securely when i am connecting to vpn ?

Thanks in advance.

CodePudding user response:

Did you check whether the DNS is resolving to the private IP of the VM when connected to the P2S?

If not,

  • Make changes to the host file of your local machine
  • Add, customdomain.com
  • Open CMD and Run, ping customdomain.com to make sure the FQDN is resolving to the private IP.
  • Related