Microsoft's Azure platform already supports the instance level public IP feature. When there are complex protocols that require multiple ports to be opened, consider turning on the PIP feature.
Introduce several concepts first:
- Vip–virtual IP Address virtual machine's public network IP
- Dip–dynamic IP Address Virtual machine's intranet IP
- Pip–instance-level Public IP address virtual machine and the network IP
For VMS created, a dip address is assigned to the intranet, and multiple VMS share a cloud Service. Each cloud service will have a VIP public network IP address.
?
If you need an address with full port, you can add a PIP address to the virtual machine. This address differs from the original VIP address and is accessible to the VM through both VIP and PIP. Just VIP needs to do endpoint settings, and Pip does not need.
?
Specific configuration method:
Configuring PIP is simple and requires only one PowerShell command:
Get-azurevm-servicename Hwpip-name Hwpip | Set-azurepublicip-publicipname Hwpipip1 | Update-azurevm
Check command:
Get-azurevm-servicename Hwpip-name Hwpip | Get-azurepublicip-publicipname Hwpipip1
This command basically doesn't see any information that you want to see. You can use the following command to observe:
Get-azurerole-servicename Hwpip-slot Production-instancedetails
Instanceendpoints????????: {SSH}
Instanceerrorcode????????:
Instancefaultdomain????: 0
InstanceName????????: HWPIP
Instancesize????????: standard_d1
Instancestatedetails????????:
Instancestatus????????: Readyrole
Instanceupgradedomain????: 0
RoleName????????: Hwpip
Deploymentid????????: 29da144bef1f432384a15635ada2ce61
IPAddress????????: 10.1.1.4
PublicIPAddress????????: 42.159.29.19
Publicipname????????: hwpipip1
Publicipidletimeoutinminutes????:
Publicipdomainnamelabel????:
Publicipfqdns????????: {}
ServiceName????????: Hwpip
OperationDescription????: get-azurerole
OperationID????????: 701a4bf1-1e38-4630-9565-ffd803c2c73a
Operationstatus???? ????: Succeeded
Here you can see the more detailed information, where publicipaddress:42.159.29.19 is the public network IP.
?
In addition, you can see the virtual machine VIP information through the command:
$VIP = Get-azuredeployment-servicename Hwpip
$vip. Virtualips
Address????????: 42.159.26.212
isdnsprogrammed????: True
Name????????: hwpipcontractcontract
Reservedipname????:
ExtensionData????:
Here you can see the VIP address: 42.159.26.212, by configuring the endpoint, you can access our open service through this address.
For example, when you enable FTP or HTTP services, and the default enabled SSH services, can be accessed through the public IP address of the PIP, or through the VIP access, but you must add endpoint.
?
However, if you set the PIP, you must add the corresponding iptables rules, otherwise it is very easy to be black out!
Azure PIP (Instance level public IP)