If I create a VNet
named mySiteToSitevNet
and configure it for Site-To-Site
connectivity. I create a Virtual Machine assign it to use mySiteToSiteVNet as its network. I Install SQL Server on it.
Do i get Public IP
to connect to that SQL Server from my WebApp which does not have VNet associated to it?
If not, how do I make my WebApp connect to that SQL Server and use the database?
There are 2 options:
If for some reason you don't want to VPN in, first you need to figure out why you don't want to do this. If there's a really good reason to not VPN in, then continue with setting up direct Internet access to the SQL Server.
If you see a “SQL Server” endpoint with 0 ACL Rules then the work is half done (shown above). If there are ACL rules then you should be finished unless you need to add more ACL Rules.
If there is no SQL Server endpoint click the “Add” button at the top of the Endpoints blade. Name the endpoint “SQL Server”, select the protocol TCP, then set the ports to 1433 (or whatever TCP ports you want to use, but 1433 is the default). Select to setup access rules for whoever needs access and block any subnets that don't need access and then OK back to the VM's properties.
At this point you can connect to the SQL Server instance through whichever method you've setup. If you are using either VPN option you can just connect to the Virtual Machine's network name. If you are going through the public endpoint (again this is REALLY NOT recommended) you'll need to connect to the machines full DNS name.
虚拟网络中部署的任何VM也可以通过公共Internet公开,因此,您的问题的答案是是的,可以为它提供一个实例的公共IP地址( https://azure.microsoft.com/en-us/documentation / articles / virtual-networks-instance-level-public-ip / )或公共负载平衡器后面的端口( https://azure.microsoft.com/zh-cn/documentation/services/load-balancer/ )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.