azure - 如何从通过 VPN 网关访问的私有(private)容器应用程序访问站点 - Azure

标签 azure azure-vpn azure-container-apps

我创建了一个私有(private)容器应用程序,我想通过 vpn 网关访问其网站。

私有(private)容器应用程序位于 VNET 中,特定于 RG,其中包含 NSG(默认配置)。此外,我还创建并配置了私有(private) DNS 区域,在其中创建了与 VNET 关联的虚拟网络链接,然后添加了名称为 *.[相同容器应用地址] 和容器应用 IP 地址的记录集。

我已经为其他虚拟机配置了 VPN 并且正在运行。它进入另一个 RG(枢纽)及其 VNET 和 NSG。我在中心 vnet 和分支 vnet 之间配置了对等互连。

所以,我无法通过 VPN 访问该网站。找不到主机。我没有办法解决它。也许 docker 容器在 9000:9000 中运行的 NSG 中有额外的配置。

这是打印基础设施的概述。

enter image description here

有人知道我可以做什么吗?

最佳答案

我尝试在我的环境中重现相同的问题并得到以下结果

我创建了具有两个子网的 vnet,一个用于容器应用程序,另一个用于 vnet

enter image description here

我们可以在下图中找到

enter image description here

我已经创建了容器应用

enter image description here

如果我们想访问应用程序,我们只有静态IP,使用静态IP我们无法访问应用程序,因此创建了私有(private)DNS区域

enter image description here

将虚拟网络与 DNS 区域集成

enter image description here

我已添加使用静态IP访问应用程序的记录集

enter image description here

我已完成中心和分支 vnet 之间的对等互连

enter image description here

之后我添加了路由表来连接主机 对于spoke1和spoke2来说

我已经添加了两个网络的路由

enter image description here

我已将spoke1 的子网路由到route1 辐条 2 也是如此 - 路线 2 也是如此

enter image description here

当我打开网络配置时,我可以看到 VPN 网关已创建

enter image description here

当我 ping VPN 网关子网时,我能够得到

enter image description here

关于azure - 如何从通过 VPN 网关访问的私有(private)容器应用程序访问站点 - Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74071401/

相关文章:

azure - 如何排查使用 Azure AD 设置 VPN 客户端连接时出现的 AADSTS650057 错误?

azure - 通过 VPN 从连接的 Azure VNETS 访问资源

azure - 尝试从 ACR 构建容器应用程序引发未经授权的错误

azure - 如何在Azure容器应用程序中添加深入的环境变量

asp.net - 错误: XML transformation error in Azure Pipelines

Azure AD B2C - 创建应用程序注册后立即出现错误 AADB2C90018

azure - 根据 AAD ID 检索 Teams 用户 ID

python - 如何在Azure数据工厂自定义事件中加载python库?

azure - 如何在资源管理器中创建与现有 VNET 的点到站点连接

适用于 Azure 容器应用程序的 Azure Rest API