简体   繁体   English

无法通过 RDP 连接到 Azure VM 但能够通过堡垒连接

[英]Unable to connect to Azure VM through RDP but able to connect through Bastion

I was able to connect to Azure VM through RDP earlier but now suddenly I'm unable to connect to VM through RDP.我之前能够通过 RDP 连接到 Azure VM,但现在突然我无法通过 RDP 连接到 VM。

I tried to connect through Powersell.我试图通过 Powersell 连接。

Even powershell script was able to connect earlier but not working now.甚至 powershell 脚本也能够更早地连接,但现在无法正常工作。 Myself didn't changed anything in Azure VM.我自己在 Azure VM 中没有改变任何东西。

I'm getting below errors.我得到以下错误。

在此处输入图像描述

在此处输入图像描述

But I'm able to connect to VM through Bastion.但我可以通过 Bastion 连接到 VM。

WinRM is already enabled in Azure VM. WinRM 已在 Azure VM 中启用。

I tried by creating new Azure VM and enabled RDP port 3389 but still getting same connection issue.我尝试通过创建新的 Azure VM 并启用 RDP 端口 3389 但仍然遇到相同的连接问题。

How to resolve issue.如何解决问题。

When debugging RDP issues one tool I use to test connectivity from a windows client is:在调试 RDP 问题时,我用来测试 windows 客户端连接性的工具是:

  • start开始
  • run
  • cmd cmd
  • telnet ip port远程登录 ip 端口
  • eg telnet 99.99.99.99 3389例如远程登录 99.99.99.99 3389
  • noting you may need to install the telnet client from windows features tool注意您可能需要从 windows 功能工具安装 telnet 客户端

Try this from multiple locations with different public addresses (including from the VM itself in some circumstances but clearly not for your issue).从具有不同公共地址的多个位置尝试此操作(包括在某些情况下从 VM 本身,但显然不是您的问题)。

Does it connect to the RDP Server listening port?它是否连接到 RDP 服务器侦听端口?

If the answer is yes then you know the server is listening.如果答案是肯定的,那么您知道服务器正在监听。

If the answer is no then the port is likely blocked, service is not available or a routing issue could be the cause.如果答案是否定的,那么端口可能被阻塞、服务不可用或路由问题可能是原因。

Thinking out loud review the resources you have sitting in front of the VM:大声思考查看您在虚拟机前所拥有的资源:

  • window firewall (Disabling all firewall profiles is a more foolproof way of troubleshooting than setting the RDP-specific firewall rule, see REF) window 防火墙(禁用所有防火墙配置文件是比设置 RDP 特定的防火墙规则更简单的故障排除方法,请参阅 REF)
  • local network outbound traffic blocks本地网络出站流量块
  • firewall in front of the vm vm前面的防火墙

Ref: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/enable-disable-firewall-rule-guest-os参考: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/enable-disable-firewall-rule-guest-os

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM