How to RDP to a load-balanced Virtual Machine? [closed] - azure

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've created a Windows VM from the Gallery as a standalone VM
I then created a second VM from the same image and in the Virtual Machive Mode of the creation wizard I select to 'Connect to Existing Virtual Machine' and select my first machine.
All is well.
However - I can't figure out how to RDP to that second machine.
As the two are load balanced they both share the same DNS entry and public IP. I can see two ports assigned for RDP, one for each machine, but I can't connect to the second one.
What am I missing?

You should be able to connect to any instance without any problems (I just tested and it works). This is how it should go:
Create your first VM, Name=vm001, Dns=vm001.cloudapp.net. This VM should contain 1 endpoint by default, port 3389 (both public & private port) for RDP.
Create your second VM and choose to connect to an existing virtual machine. Name=vm002, but you won't be able to choose the Dns. By connecting to an existing VM (vm001 in this case), you'll reuse the same Dns. In this case it would be vm001.cloudapp.net. Check the endpoints for this new virtual machine. You'll see an endpoint for RemoteDesktop with private port 3389, but the public port will be something different (like 62295 for example). Note that this enpdoint is not load balanced.
The fact that each VM has its own public port for RDP and that the endpoint is not load balanced should be enough to connect to the instances without any issues. This means:
vm001.cloudapp.net:3389 > vm001:3389
vm001.cloudapp.net:62295 > vm002:3398
If you still have issues connecting, go to the portal, select the VM and choose the connect button. Also check if your firewall allows you to connecton this random port (maybe your firewall allows connections to 3389 but not to 62295 for example).

Related

How to setup connection via VPN to private AKS [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
Improve this question
I am trying to setup a private AKS cluster which I want to manage from a user laptop using kubectl. I have tried to create a simple setup with one vNET, Azure VPN gateway with OpenVPN configuration, where the VPN Gateway is attached to one subnet of the vNET and AKS is configured via Azure CNI to live in another subnet of the same vNET. I have expected that this is all I would need to get manage the cluster as long as I am connected to the VPN (I understood that all subnets on a vNET are routed by default). But when I try to use kubectl I get Unable to connect to the server: dial tcp: lookup : no such host My network knowledge does not go too deep unfortunately, but should this just work? I mean it all lives within the same vNET. Thank you.
My setup is very similar and I ran into the same situation. This was a DNS issue for me.
If you have a private DNS zone with your private AKS cluster (should be in the resource group which was created for the AKS private cluster), go find the DNS record and IP address for the API server. Put that IP address into your hosts file (/etc/hosts if on linux or WSL) with the fully qualified domain name, then try your kubectl commands again.

How to redirect http port to Docker in Azure's Ubuntu virtual machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have Ubuntu running on a Microsoft Azure's virtual machine. I have a docker container running on it, and it has a web server attached to it. (Running on 172.17.0.1:80)
Now I'm trying to make it accessible publicly, using the Azure's public IP
In the Networking settings, I have tried to create an inbound port rule
But it's not working...
I've tried tracert to see where my ping goes when I try to connect to the IP, with no result.
I've done basic port routing in the past, but I can't figure out why this one is not working...
I just want to type 13.94.212.10 on my personal connection, and access the website.
Thank you in advance
If you want to access the application on your Azure VM publicly with its public Ip address.
You could whitelist you client public IP in the NSG rule like, add the client public IP in the Source IP addresses.
Please note that
If you specify an address for an Azure resource, specify the private
IP address assigned to the resource. Network security groups are
processed after Azure translates a public IP address to a private IP
address for inbound traffic, and before Azure translates a private IP
address to a public IP address for outbound traffic.
Read https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview#security-rules

Switch Azure from dynamic to static IP address [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How do I change my Azure website from using a dynamic IP address to a static IP address?
I want a static IP address that never changes.
I evidently do not have a virtual machine, as illustrated below.
App Service is a PaaS (Platform as a Service) Offering. In PaaS, you don't have access to the server.
The Virtual Machine screenshot that you have shared in of Infrastructure as a Service (IaaS) type. So, App Services will not have IaaS - Virtual Machines and that's the reason why the VMs listing (in your question) is empty.
Now, coming to you question of a Static IP for your app. You can find it in the Custom Domains section of App Service as shown below.
And, this IP Address will change ONLY when you change (especially degrade from a higher tier to lower tier) the App Service Plan. If it doesn't change then you are lucky enough. But, Microsoft doesn't guarantee that it retains the IP Address if you change the App Service Plan's tier.
Another point to note is that you might see the same IP Address for another App Service too. that's completely fine and it works well even if you want to map your own domain to this App Service.
Update:
When the App Service makes calls to another external end point, then it uses altogether another set of IP Addresses called Outbound IP Addresses which could be found in the Properties blade as shown below.
So, you need to share ALL the IP Addresses that are under Additional Outbound IP Addresses to the external WebService team for whitelisting. This way, your problem will be resolved.
Let me know of it makes sense now.
Update2:
For App Service, We can't create & assign a separate Static IP explicitly. If you need a static IP for some reason, then you have to choose Virtual Machines and then assign a Static IP Address to that VM and use the VM to deploy the Website.

How to connect to Microsoft Azure virtual machine on Windows Subsystem for Linux through SSH? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I created a Microsoft Azure Virtual Machine with Windows 10 as the image. I allowed it to have an SSH connection. The connection on the Microsoft Azure portal says "Network connectivity allowed". However, when I try to connect it on the Windows Subsystem for Linux using the command: ssh -i <private key path> <vm-name>#<host ip address> it says ssh: connect to host <host ip address> port 22: Resource temporarily unavailable. Why is this happening?
I am also wondering about the instructions on the Microsoft Azure instructions on creating a private key and then having a private key path. How am I suppose to create a private key and have a path for it?
You can check out microsoft/WSL/issue 2278, which lists a couple of issues:
firewall
the domain had been moved to cloud front and I needed to use the direct IP address instead of the domain name.
I received a "Resource temporarily unavailable" error because my subnet did not have a route to an Internet Gateway
I just had this problem because I installed Nginx in the server and it blocks SSH by default. You have to sudo ufw allow ssh.
Note: as explained in "Connect to an Azure Linux vm with ssh and Windows Subsystem for Linux" by matthewdavis111, you connect from WSL to Azure.
Meaning you would enter your public key in the SSH field of your Azure remote server:
On your PC, you can generate a public/private key with:
ssh-keygen -P "" -t rsa -f azure
That will create in %USERPROFILE%\.ssh an azure and azure.pub files.
Copy the content of the second one (public key) to Azure settings.
Depending on your version of Windows 10, you might need to install Git for Widows, which includes ssh-keygen.exe.
C:\path\to\Git\usr\bin\ssh-keygen.exe
In your case though, doing so in a WSL bash session is better, especially if the rest is done from that same session.
The files will be in ~/.ssh ($HOME/.ssh)
For a Windows 10 VM, see "Creating A Win 10 Virtual Machine – Azure Portal" by Ayush Rathi.
No need for SSH then.
Connecting to the Virtual Machine and Log On:
On the Hub menu, click Virtual Machines.
Select the virtual machine from the list.
On the Virtual Machine Blade, Click on Connect. This creates and downloads a Remote Desktop Protocol file (.rdp file) to connect to your machine. Open this file to connect to your VM.
You will get a warning that the .rdp is from an unknown publisher.This is a normal warning. In the Remote Desktop window, click Connect to continue.
In the Windows Security window, type the username and password that you entered while creating the VM. The username is entered as vmname\username, then click OK.
You will get a warning that the identity of the remote computer cannot be verified. This is a normal warning. Click Yes to verify the identity of the virtual machine and finish logging on.
Your machine is ready and you can use it just as you would use any other machine or server.

How to configure Azure load balancer NAT rules for multiple VMs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Here is what I am trying to achieve:
I created two Linux VMs in same virtual network (same subnet)
These two VMs don't any public IP address. For security, I don't want to have any public IP associated with them.
However, I need ssh into those VMs. Since, they just have private IP and not public IP addresses, I am setting up a load balancer with public IP.
Now I am using inbound NAT rules to redirect SSH traffic to those VMs.
When I add first NAT rules, it gives me a choice to choose VM to where I want to redirect the traffic to. So all is good so far.
However, when I try to add one more NAT rule, portal UI doesn't provide me any option to choose other VM. It adds the rule against the same VM.
Is there anything am I missing? Is it supposed to work differently? I also tried add multiple virtual machines to backend pool. That also doesn't let me add more than one VM.
Should I put two VMs in VM Scaleset or Availability set?
In Azure, we can use Load balancer with a single standalone VM, also we can use Load Balancer with multiple VMs in an availability set.
If you want to use Load Balancer NAT to multiple VMs, we should re-create VMs in same availability set.
In Azure Resource Module, we can delete VMs and keep the VHD, then use PowerShell to create VMs in the same availability set. (Re-create)

Resources