Azure VM IP Address - azure

I'm trying to run some VOIP software on my Azure VM, but it's picking up the internal IP address 10.x.x.x and broadcasting it to external servers. The external servers obviously can't see that internal address. So, I want to configure the machine such that its IP address is the static external address (13.x.x.x). When I run ipconfig, I need the IPv4 address to be my (13.x.x.x). This way the VOIP software will broadcast the correct externally accessible IP address.
What's the best way to do this in Azure? Do I just go to the server itself and turn off "obtain IP address automatically" and put in my static external IP or is there some other "Azure" way of doing what I'm trying to do? PS. I'm pretty new to Azure VMs and associated IT management.

OK, so what I ended up doing is:
In the portal I added an address range and sub-net to the virtual network that included my external, static IP address
In the portal I changed the sub-net that the VM network interface was using to the new one that included my external IP. I also set the address to "static" and put in external address
Rebooted the VM
The VM now reports the internal address and external address as being the same external address which is what I wanted. Not sure if this is the best or only way to do this but it worked for me. Open to better recommendations if anyone has one.

Related

Azure VM losing Static IP addresses after restart

I have around 30 VMs on Azure and all have static IP-Addresses. Now suddenly after a restart, one has changed to Dynamic address and got a new IP address.
This happens for 2 machines so far within a 2 weeks period.
How can that happen and how can I get back previous IP addresses since they are registered in a firewall that provides a service to us?
BR
Amin
I did reproduce your issue and found that.
Point 1: Went to ipconfig and make it as static Ip address and did check after restart and stop as well I am getting the same static Ip address.
Point 2: Manually assign the same static IP address in VM itself now I can’t connect to my VM.
So, we don't recommend to make any change on the NIC card settings on the VM.
Point 3: Permanent solution for this not to lost the static Ip address is use the PowerShell command to create a Virtual Machine with the static IP address. If you configure the settings on the NIC card, after reboot it may change the IP address, so the best way to set static IP address is as per the recommended way in the article above.
PowerShell Command to Set Static Private IP
PowerShell Command to Set Static Public IP
Reference : Azure VM looses static IP after stopping and starting the VM in the portal?

Azure Users Sign-ins shows proxy IP address instead of the real IP

I'm trying to find a way to display the real IPs of VMs a user has tried to sign in instead of the proxy's IP in the "Sign-ins" section of each user.
For example if user "max" tried to sign in to a vm that has the IP '10.0.0.1' then when I go to the Sign-ins section of user max it will show me that this user tried to log in at 10.0.0.1 and not at the proxy IP.
I don't think you can do that unless your VM is directly to connect to the Internet without any proxy. Also, in your example, the IP address 10.0.0.1 is a private address that does not route on the Internet.
To display the IP address is a bit to rely on the networking environment where your VMs. From the Sign-in activity reports in the Azure Active Directory portal, currently Azure tries best effort to convert the IP address to a physical location where the computer located as mapping IP addresses is complicated by the fact that mobile providers and VPNs issue IP addresses from central pools that are often very far from where the client device is actually used.
IP addresses are issued in such a way that there is no definitive
connection between an IP address and where the computer with that
address is physically located. Mapping IP addresses is complicated by
the fact that mobile providers and VPNs issue IP addresses from
central pools that are often very far from where the client device is
actually used. Currently in Azure AD reports, converting IP address to
a physical location is a best effort based on traces, registry data,
reverse look ups and other information.

Dynamic Azure public IP Address

In which scenario can we use a dynamic public IP Address ? I cannot think of a scenario where i would want to expose a public IP for internet facing azure services but that could be dynamic.
The two scenarios we use dynamic IPs are
A VM has a mechanism to auto update a DNS A record with its new address.
The Ip address has a CNAME mapped to the DNS name - so mapping www.example.com to example.westus2.cloudapp.azure.com This way whenever the address changes it still points to the same thing.
Remember though that a dynamic IP address doesn't change unless the VM is deallocated. Or the underlying host fails and VM is started on another host.
Hope this helps- https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm
That outlines the use cases for both static and dynamic IPs.
The main use case for dynamic PIP's for me is for gateways. For web or app services I would use static.

The IP address of my Azure Windows VM changed without waning

A few days ago, the IP address of our VB Windows Server changed from 40.x.x.x to 13.x.x.x on the Azure platform. We have many loggers in the field that connect to this IP address and now, none of them can connect.
Can the IP change without any warning from Azure?
Also, there is no support to be found. No number, no online support... I mean, This is not a problem I should be paying support for... besides.. support is more expensive than the VM.
Your IP address will change if, for instance, you restart your virtual machine. However, you can set this to be static by doing so:
go to Public IP addresses
Click Configuration
Set assignment to Static
Click Save
This will retain the IP address that you have right now but at an additional cost.
Can the IP change without any warning from Azure?
For now, there is no warning when public IP address change. I think you should know IP address types and allocation methods in Azure.
There are two methods in which an IP address is allocated to a public IP resource - dynamic or static. The default allocation method is dynamic, where an IP address is not allocated at the time of its creation. Instead, the public IP address is allocated when you start (or create) the associated resource (like a VM or load balancer). The IP address is released when you stop (or delete) the resource. This causes the IP address to change when you stop and start a resource.
If you want to public IP address not change, you could change dynamic to static.

Configuring an IP address for SagePay Direct when using Windows Azure

I've entered the IP address from the Windows Azure Portal (both the one specified in the website Dashboard or within the Manage Domains area) but when trying to use SagePay Direct it returns that it is not a valid IP address.
I eventually solved this by doing a "showpost" for SagePay and then having to tell me what the IP address is.
The problem is - how can I determine this IP address for myself? As I worry that the IP address could change in the future.
If I use "Request.ServerVariables("LOCAL_ADDR")" (Classic ASP) it seems to return the local IP address of the webserver.
what if you create a script or something that just returns the visitor IP address and make a request, get or post, to that script from your server?
The IP Address that you see to use for your A records is not the outgoing IP Address used by Azure Websites. Hence why SagePay does not accept transactions from the website because it is an invalid IP Address.
Instead there are 4 IP Addresses that you need to add, and those 4 IP Addresses depend on what Scale Unit your site uses.
The scale unit for your site can be found from the FTP Host Name for your Azure website. For example: ftp://waws-prod-blu-011.ftp.azurewebsites.windows.net - the scale unit is 'waws-prod-blu-011'
I then put that into Google, and a couple of azure maintenance articles came up. Scroll the article to you see your region, and then your scale unit and there are the 4 IP Addresses you need.
Please refer to this azure maintenance article for more information.

Resources