问题标签 [azure-vpn]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3766 浏览

c# - System.ComponentModel.Win32Exception:等待操作从 Azure VPN 超时

在此处输入图像描述我们有一个 Azure 应用服务,它尝试使用 VPN 经典(使用 VNET 配置)连接到本地 SQL 服务器。

有时我们会收到以下错误:

System.Data.SqlClient.SqlException (0x80131904):建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接。(提供者:TCP Provider,错误:0 - 等待操作超时。)---> System.ComponentModel.Win32Exception (0x80004005):等待操作超时

在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity 标识,SqlConnectionString connectionOptions,SqlCredential 凭据,对象 providerInfo,字符串 newPassword,SecureString newSecurePassword,布尔重定向用户实例,SqlConnectionString userConnectionOptions,SessionData reconnectSessionData,DbConnectionPool 池,字符串 accessToken,布尔 applyTransientFaultHandling)

在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions 选项,DbConnectionPoolKey poolKey,对象 poolGroupProviderInfo,DbConnectionPool 池,DbConnection owningConnection,DbConnectionOptions userOptions)

在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool 池,DbConnection owningObject,DbConnectionOptions 选项,DbConnectionPoolKey poolKey,DbConnectionOptions 用户选项)

在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,DbConnectionOptions userOptions,DbConnectionInternal oldConnection)

在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject,DbConnectionOptions userOptions,DbConnectionInternal oldConnection)

在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,布尔allowCreate,布尔onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal& 连接)

在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,TaskCompletionSource`1 重试,DbConnectionOptions userOptions,DbConnectionInternal& 连接)

在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,TaskCompletionSource`1 重试,DbConnectionOptions userOptions,DbConnectionInternal oldConnection,DbConnectionInternal& 连接)

在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1 重试,DbConnectionOptions userOptions)

在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1 重试,DbConnectionOptions userOptions)

在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 重试)

在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 重试)

在 System.Data.SqlClient.SqlConnection.Open()

在 Dapper.SqlMapper.d__11`1.MoveNext()

在 System.Collections.Generic.List 1..ctor(IEnumerable1 集合)

在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 源)

在 Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable 1 commandTimeout, Nullable1 commandType)

在 SiSystems.ClientApp.Web.Domain.Repositories.UserRepository.FindByPrimaryEmail(字符串用户名)

在 SiSystems.ClientApp.Web.Domain.Repositories.UserRepository.FindByName(字符串用户名)

在 SiSystems.ClientApp.Web.Auth.UserStore.<>c__DisplayClass3_0.b__0()

在 System.Threading.Tasks.Task`1.InnerInvoke()

在 System.Threading.Tasks.Task.Execute()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.AspNet.Identity.TaskExtensions.CultureAwaiter`1.GetResult()

在 Microsoft.AspNet.Identity.UserManager`2.d__12.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 SiSystems.ClientApp.Web.Auth.ApplicationOAuthProvider.d__2.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.d__3f.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)

在 Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.d__22.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)

在 Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.d__0.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.d__0.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.d__0.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.d__0.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.d__0.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.d__5.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

在 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.d__2.MoveNext()

--- 从先前抛出异常的位置结束堆栈跟踪 ---

在 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)

在 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar)

在 System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep 步骤)

在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously)

ClientConnectionId:00000000-0000-0000-0000-000000000000

错误号:258,状态:0,类:20

添加了我从 azure 获得的日志图像

0 投票
1 回答
110 浏览

azure - 仅使用预共享密钥的 Azure 站点到站点?

我想在 Azure 中创建站点到站点 VPN。Azure VNG 将通过 LNG 连接到本地网络。但是这种情况只需要预共享密钥。为什么?证书比预共享密钥更安全。如果路由器不使用带有预共享密钥的协议,我该怎么办?没有什么?

0 投票
2 回答
1994 浏览

azure - 对等网络上的 DNS 服务器在 VPN 到 Azure 网络时 DNS 失败

我在 Azure 中有以下设置:

资源组 1

  • 作为 DNS 和 DC 服务器“My1stVM”的虚拟机
  • 虚拟网络“vNet1”
  • 从 vNet1 对等到 vNet2

资源组 2

  • 虚拟网络“vNet2”
  • 从 vNet2 对等到 vNet1
  • 虚拟机“My2ndVM”
  • 虚拟网关

当我创建从家用笔记本电脑到虚拟网络网关的 VPN 连接时,我可以:

  • 连接VPN成功
  • RDP 仅通过内部 IP 地址到 My2ndVM,不能通过 FQDN 或计算机名进行
  • 仅通过内部 IP 地址 Ping My2ndVM,无法通过 FQDN 或计算机名执行

我不明白为什么我无法 ping 我的计算机名或 FQDN。

如果我做 NSLookUp 我得到

192.167.64.4 是 DNS 服务器的正确内部 IP

如果我尝试 Ping 192.167.64.4 我得到:

有没有人能帮助我理解问题以及如何解决它?

0 投票
1 回答
1959 浏览

azure - 通过 Azure VPN 网关连接到 Azure SQL Server

我有一个 Azure SQL Server 和 Azure SQL 数据库,一个带有两个子网、一个 vm 和一个 Azure VPN 网关的虚拟网络。

VM 位于 Subnet1 上。

Azure VPN 网关使用 GatewaySubnet。

在 Azure SQL Server > 防火墙和虚拟网络 > 我添加了两个子网。

现在,如果我通过 VPN 连接到我的虚拟网络并连接到 VM,然后我可以在此 VM 内使用 SSMS 成功连接到 Azure SQL Server。

如果我尝试在已建立 VPN 连接的情况下从笔记本电脑连接到 Azure SQL Server(所以不是通过 VM),它不会让我连接。

我可以看到文档(https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vnet-service-endpoint-rule-overview#limitations)说Site-to-Site and Express不支持路由,但它没有说不支持点到站点,所以希望这可以工作。

有谁知道文档是否有误,没有将其声明为不受支持,或者我做错了什么?

0 投票
1 回答
3338 浏览

azure - Azure WebApp - 获取连接在 VNET 上的服务的私有 IP

我在 VPN 中有一个 Azure WebApp。当我继续联网时,我看到这样的连接:

在此处输入图像描述

当我单击“单击此处进行配置”时,它似乎已启动并运行:

在此处输入图像描述

所以,一切看起来都很好。

VPN 外部连接但我在哪里可以找到此 Web 应用程序的内部“VPN”IP 地址?

如果我继续配置/ SCM 等,我只能找到“外部”IP!

谢谢

0 投票
1 回答
961 浏览

azure - Azure Point to site Port can't connect to Azure VM or Port

I have created a azure vm on ubuntu tls ubuntu 16.04 and i have created a azure vpn gateway as mentioned in this document https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal the problem is i have successfully connected to the vpn but when i try to access any port that is allowed for my virtual network only. I get an error of 10060. Which means that timed out. I am behind a D-Link router. Do i need to connect my router to the vpn or my pc is enough to get connected to the vpn to access the vm azure. i want to access ssh through my Vnet only As seen in the picture i want my vpn gateway or vnet to access the ssh port only and restricted to others. But it gives 10060 error

VPN Connection Successful VPN connection is successful. What can be the problem. If i change the source to any it will connect perfectly There's no IP overlapping.

0 投票
1 回答
124 浏览

azure - 具有 RADIUS 的 Azure VPN 网关 - 公共 IP 未更改

我为 Azure VPN 配置了 RADIUS 身份验证。所有接缝都可以正常工作,至少当我与客户端连接时,连接成功并且 PPP 适配器 IP 地址已正确更改。但是为什么以太网/公共 IP 地址没有改变?

我可以 ping Azure VM 中的 VM,但公共 IP 保持不变。

0 投票
1 回答
1486 浏览

azure - 具有虚拟网络的 Azure 网关

关于网关和虚拟机的设置,我有多个问题,所以这就是我的实际情况。

我有一个应用程序网关和两个 VM Ubuntu,一切都托管在 Azure 上。它们都在同一个虚拟网络上。两个虚拟机都只有一个私有 IP(10.1.0.4 和 10.1.0.5),网关有一个私有 IP(10.1.1.4)和一个公共 IP。因为只有Gateway有公网IP,所以我想一切都要经过它,这就是我想要的。

我试图实现的目标:

  • 在端口 1680 上做一个负载均衡器,重定向到端口 1680。

  • 重定向每个 VM 的 SSH 以专门连接到一个,因为目前它们没有公共 IP。是否可以使用基于路径的规则来做到这一点?像 www.example.com/VM1 一样通过 SSH 连接到第一个虚拟机?如果不是,可以使用什么来区分 VM1 和 VM2 的 SSH 连接?

  • 将网关的 80 端口重定向到特定 VM 的 8080 端口。作为我之前的示例,www.example.com/adminPanelVM1 连接到端口 80 上的第一个 VM(重定向到 VM 上的端口 8080)

我已经设法使用 HTTP 参数、侦听器和规则创建网关端口 1680 的重定向。

0 投票
1 回答
401 浏览

azure - 通过 Azure VPN 网关从外部计算机连接到本地网络

我的目标是通过 Azure VPN 网关从外部计算机连接到 Azure 虚拟网络和小型本地网络:

Azure 虚拟网络的地址范围为 10.1.0.0/16。本地网络的地址范围为 10.2.0.0/16。

到目前为止,我已经完成了以下工作:

  • 在虚拟网络上设置虚拟网关。
  • 虚拟网关配置为点到站点 VPN 网关。
  • 虚拟网关通过站点到站点连接连接到本地网络。

所以拓扑是这样的:

我现在可以通过 VPN 拨入,但我只能 ping 虚拟网络内的地址。本地地址不可访问。

我也添加了这条线

到 VPN 客户端上的 routes.txt 文件,但它仍然无法正常工作。

0 投票
1 回答
4107 浏览

azure - Azure 上的多个站点到站点 VPN 连接

我按照提供的步骤创建了站点到站点 VPN 连接:https ://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-经理门户

如果我想创建另一个站点到站点 VPN 连接(到使用不同本地网关的另一个站点),我可以使用同一个虚拟网关来执行此操作吗?还是我需要创建一个额外的虚拟网络网关?