Can I change VM's private ip address (e.g. to the public static ip address

pankaj kumar 21 Reputation points

Hi all. I recently started learning Azure. I created a virtual machine someone else to use it as a web server. The developer sees the IP address as in the TCP/IPv4 properties in the operating system of the VM which is the same as private static IP address visible on the azure portal. The developer requires this IP address ( to be same as the public IP address of VM visible on azure portal Is it possible at all? If yes, how can I do this?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,350 questions
0 comments No comments
{count} votes

Accepted answer
  1. srbhatta-MSFT 8,526 Reputation points Microsoft Employee

    Hello @pankaj kumar ,
    Thanks for reaching out to Microsoft QnA. Happy to answer your question.
    No, you cannot set the private address of the VM to be same as that of the public address. Both private and public addresses have separate address ranges and have a different purpose. If the developer wants to access the web server from the Internet, he will require the public IP address.
    On the other hand, the private address of the VM is only private to the virtual network that the VM is associated to, and cannot be accessed from Internet. Only the resources that are part of the same virtual network can access the web browser VM using the private IP address. Whereas, anybody outside the virtual network will not be able to access the VM using private IP address, but has to access the VM using it's public IP address.
    Hope this explains the usage of public and private IP addresses.


    Please don't forget to 179759-accept.png and 179670-upvote.png if you think the information provided was useful so that it can help others in the community looking for help on similar issues.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful