[英]Azure VM public static outbound IP
I have written a small service to grab files from one ftp server, edit them, and then send them to another ftp server. 我写了一个小服务来从一个ftp服务器获取文件,编辑它们,然后将它们发送到另一个ftp服务器。 The catch being the ftp server being sent to requires a white-list of IP's.
捕获的是要发送到的ftp服务器需要一个白名单的IP。 Now I chose to host this service on a Azure VM set up with a virtual public reserved IP address, thinking it would create a static IP that I could use for the white-list.
现在,我选择在使用虚拟公共保留IP地址设置的Azure VM上托管此服务,认为它将创建一个可用于白名单的静态IP。
Unfortunately even though the VM states the virtual public reserved IP is connected to the VM, when opening up a browser and going to whatismyip.com I get a completely different IP and of course Azure shuts all VMs down once every 2-3 months for maintenance (which I assume flushes the IP). 不幸的是,即使VM声明虚拟公共保留IP连接到VM,在打开浏览器并转到whatismyip.com时,我得到一个完全不同的IP,当然Azure每2-3个月关闭一次所有VM以进行维护(我假设冲洗IP)。
Now I understand that the IP received from whatismyip.com is probably connected to the Azure load balancer but I can't figure out for the life of me why that would be the one that shows up for outbound connections. 现在我明白从whatismyip.com收到的IP可能连接到Azure负载均衡器,但我无法弄清楚为什么会出现出站连接。
My questions are: 我的问题是:
Is it possible to obtain a static public IP for outbound connections for that whitelist? 是否可以为该白名单获取出站连接的静态公共IP?
Is there some obvious workaround I'm missing? 我有什么明显的解决方法吗?
Will Azure scheduled maintenance shutdowns save IP information? Azure计划的维护关闭是否会保存IP信息?
Is Azure just not a good platform for this kind of work? Azure是不是这种工作的好平台? If so what is?
如果是的话是什么?
Now it is indeed possible. 现在确实有可能。 Please see https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/ for details.
有关详细信息,请参阅https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/ 。
The powershell code is as follows: powershell代码如下:
New-AzureReservedIP –ReservedIPName MyReservedIP –Location "Central US"
$image = Get-AzureVMImage|?{$_.ImageName -like "*RightImage-Windows-2012R2-x64*"}
New-AzureVMConfig -Name TestVM -InstanceSize Small -ImageName $image.ImageName `
| Add-AzureProvisioningConfig -Windows -AdminUsername adminuser -Password MyP@ssw0rd!! `
| New-AzureVM -ServiceName TestService -ReservedIPName MyReservedIP -Location "Central US"
Besides, now outbound connections only use a handful IPs by default. 此外,现在出站连接默认只使用少数IP。 You can see them in new portal: https://portal.azure.com in site's Settings → Properties
您可以在新门户中看到它们: https : //portal.azure.com在站点的设置→属性中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.