Is it possible to change the pubblic ip, eventually through proxy servers?

Eric 21 Reputation points
2022-09-09T18:41:12.087+00:00

i have tried this for the past day, but i can't understand how to do it.

I have created a vm the vm get's assign a nic pubblic ip like 20.x.x.x.x

i want to change that ip to something in the same state, like 68.x.x.x.x but i can't find a way to modify that value manually and i don't know how to eventually use proxy servers to use that pubblic ip either, is it possible? and if yes how?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,991 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Olga Os - MSFT 5,921 Reputation points Microsoft Employee
    2022-09-09T19:29:26.463+00:00

    Hello @Eric ,

    Welcome to the MS Q&A forum.

    The address is assigned from a pool of addresses used in each Azure region. To see a list of address pools used in each region, see Microsoft Azure Datacenter IP Ranges. The address assigned can be any address in the pools used for the region. If you need the address to be assigned from a specific pool in the region, use a Public IP address prefix.

    Hope above answers your questions and concerns.

    --------------------------------------------------------

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Sincerely,
    Olga

    0 comments No comments

  2. Eric 21 Reputation points
    2022-09-09T21:49:13.873+00:00

    can i use a proxy sock as main ip?


  3. Eric 21 Reputation points
    2022-09-09T23:59:21.843+00:00

    none of the papers i followed had any explanation that worked, what i meant is if azure give me a pubblic (nic) ip can i choose a specific ip, eventually based on a proxy sock i owned to replace the main nic pubblic ip??

    0 comments No comments

  4. Eric 21 Reputation points
    2022-09-10T19:01:46.857+00:00

    so can someone just point me to a video or a simple explanation of how can i change the assigned nic public ip with one in the list of the azure available one? i tried changing it from the list on the post above and still i get the failed to connect because of the sbnet 10.x.x.x etc

    0 comments No comments

  5. Olga Os - MSFT 5,921 Reputation points Microsoft Employee
    2022-09-10T20:42:55.843+00:00

    @Eric ,

    No, you can't choose a specific public ip.

    239738-image.png

    If your end goal to assign a public ip address within the OS, it's not recommended and could lead to the lost connectivity:

    239657-image.png

    ---------------------------------------------------------

    You could also review THIS article with outlined steps on how add IP addresses to a VM OS:

    ---------------------------------------------------------

    Private
    Private IPv4 or IPv6 addresses enable a virtual machine to communicate with other resources in a virtual network or other connected networks.

    By default, the Azure DHCP servers assign the private IPv4 address for the primary IP configuration of the Azure network interface to the network interface within the virtual machine operating system. Unless necessary, you should never manually set the IP address of a network interface within the virtual machine's operating system.

    There are scenarios where it's necessary to manually set the IP address of a network interface within the virtual machine's operating system. For example, you must manually set the primary and secondary IP addresses of a Windows operating system when adding multiple IP addresses to an Azure virtual machine. For a Linux virtual machine, you must only need to manually set the secondary IP addresses. See Add IP addresses to a VM operating system for details. If you ever need to change the address assigned to an IP configuration, it's recommended that you:

    1. Ensure that the virtual machine is receiving a primary IP address from the Azure DHCP servers. Do not set this address in the operating system if running a Linux VM.
    2. Delete the IP configuration to be changed.
    3. Create a new IP configuration with the new address you would like to set.
    4. Manually configure the secondary IP addresses within the operating system (and also the primary IP address within Windows) to match what you set within Azure. Do not manually set the primary IP address in the OS network configuration on Linux, or it may not be able to connect to the Internet when the configuration is re-loaded.

    5. Re-load the network configuration on the guest operating system. This can be done by simply rebooting the system, or by running 'nmcli con down "System eth0 && nmcli con up "System eth0"' in Linux systems running NetworkManager.
    6. Verify the networking set-up is as desired. Test connectivity for all IP addresses of the system.

    By following the previous steps, the private IP address assigned to the network interface within Azure, and within a virtual machine's operating system, remain the same. To keep track of which virtual machines within your subscription that you've manually set IP addresses within an operating system for, consider adding an Azure tag to the virtual machines. You might use "IP address assignment: Static", for example. This way, you can easily find the virtual machines within your subscription that you've manually set the IP address for within the operating system.

    In addition to enabling a virtual machine to communicate with other resources within the same, or connected virtual networks, a private IP address also enables a virtual machine to communicate outbound to the Internet. Outbound connections are source network address translated by Azure to an unpredictable public IP address. To learn more about Azure outbound Internet connectivity, read the Azure outbound Internet connectivity article. You cannot communicate inbound to a virtual machine's private IP address from the Internet. If your outbound connections require a predictable public IP address, associate a public IP address resource to a network interface.

    ---------------------------------------------------------

    Sincerely,
    Olga Os

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.