The Problem
The idea is to provision an Application Gateway inside a virtual network and configure it as a reverse proxy to the Azure web app. This means, the web app should never receive traffics directly, but only through the gateway. The Gateway needs to configure with the custom domain and SSL certificates. Once a request receives, the gateway then off-load the SSL and create another SSL to the back-end web apps configured into a back-end pool. For a development purpose, the back-end apps can use the Azure wildcard certificates (*.azurewebsites.net) but for production scenarios, it’s recommended to use a custom certificate. To make sure, no direct traffic gets through the azure web apps, we also need to white-list the gateway IP address into the web apps. This will block every requests except the ones coming through the gateway.
How to do that?
I have prepared an Azure Resource Manager template into this Github repo, that will provision the following:
- Virtual network (Application Gateway needs a Virtual network).
- Subnet for the Application Gateway into the virtual network.
- Public IP address for the Application Gateway.
- An Application Gateway that pre-configured to protect any Azure Web site.
How to provision?
- Azure subscription
- Azure web site to guard with WAF
- SSL certificate to configure the Front-End listeners. (This is the Gateway Certificate which will be approached by the end-users (browsers basically) of your apps). Typically a Personal Information Exchange (aka pfx) file.
- The password of the pfx file.
- SSL certificate that used to protect the Azure web sites, typically a *.cer file. This can be the *.azurewebsites.net for development purpose.
parameters.json
file with the appropriate values, some examples are given below: "vnetName": {
"value": "myvnet"
},
"appGatewayName": {
"value": "mygateway"
},
"azureWebsiteFqdn": {
"value": "myapp.azurewebsites.net"
},
"frontendCertificateData": {
"value": ""
},
"frontendCertificatePassword": {
"value": ""
},
"backendCertificateData": {
"value": ""
}
frontendCertificateData
needs to be Base64 encoded content of your pfx file. $> ./deploy.ps1 `
-subscriptionId "" `
-resourceGroupName ""
Tin tức khoa học bí ẩn
Tin tức pubg
Thủ thuật pubg
Blog tin tức thủ thuật pubg
LikeLike