[英]Azure: which of my cloud services has a specific IP address?
We have a rogue Azure cloud service which is hammering one of our services. 我们有一个流氓的Azure云服务正在敲定我们的一项服务。
We know its IP address, but how can we find out the name of the cloud service (ie the resource group), given its IP address? 我们知道它的IP地址,但是在给定IP地址的情况下,如何找到云服务的名称(即资源组)?
Assuming you have RM deployments in azure since you asked for resource group. 假设自您请求资源组以来,您已经在天蓝色地部署了RM部署。
If what you have is a public IP address 如果您拥有的是公共IP地址
Get-AzureRmPublicIpAddress | Where-Object {$_.IpAddress -eq "0.0.0.0"}
If what you have is a private IP address 如果您拥有的是专用IP地址
Get-AzureRmNetworkInterface | Where-Object {$_.IpConfigurations.PrivateIpAddress -eq "0.0.0.0"}
If you have classic deployment, these two should help you: 如果您有经典的部署,这两个应该可以帮助您:
Get-AzureVM | Where-Object{$_.IpAddress -eq "0.0.0.0"}
Get-AzureVM | Where-Object{$_.PublicIPAddress -eq "0.0.0.0"}
If what you have is something classic deployment but not a VM. 如果您拥有的是经典部署而不是VM。 This is the closest solution I can come up so far.
到目前为止,这是我能提出的最接近的解决方案。 It finds you the rogue cloud service BUT also returns an error for each cloud service don't have a matching IP and takes about 20s to scan each cloud service.
它会发现您的流氓云服务BUT还会为每个不具有匹配IP的云服务返回错误,并且大约需要20秒钟来扫描每个云服务。
Get-AzureService | ForEach-Object {Get-AzureDeployment -ServiceName $_.ServiceName | Where-Object {$_.VirtualIPs.Address -like "0.0.0.0"}}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.