首页 文章

如何在Azure中的ubuntu中启用Internet连接

提问于
浏览
0

How to enable internet connection in ubuntu in Azure

我从Azure Cloud 配置了Ubuntu VM . 默认情况下,Azure有防火墙,它阻止了互联网连接 . ping到google.com无效 . 命令apt-get update提供以下输出 .

root @ linuxserver#apt-get update错误:1 http://security.ubuntu.com/ubuntu xenial-security InRelease临时故障解决'security.ubuntu.com'Err:2 http://archive.ubuntu.com/ ubuntu xenial InRelease临时故障解决'archive.ubuntu.com'错误:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease临时故障解决'archive.ubuntu.com'Err:4 http:// archive . ubuntu.com/ubuntu xenial-backports InRelease临时故障解决'archive.ubuntu.com'阅读包列表...完成W:无法获取http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease临时故障解析'archive.ubuntu.com'W:无法获取http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease临时故障解决'archive.ubuntu.com'W:无法获取http:/ /archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease临时故障解决'archive.ubuntu.com'W:无法获取http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease临时的fa ilure解析'security.ubuntu.com'W:某些索引文件无法下载 . 它们被忽略了,或者使用了旧的 .

在/etc/resolve.conf中,我有像10.x.x.x这样的IP . (出于安全原因无法提供完整的IP)如何检查Internet是否在Azure或网络级别的防火墙级别被阻止 . 如何对Ubuntu VM进行故障排除和启用Internet .

我做谷歌搜索并读取我的配置中应该有Microsoft公共DNS服务器 . 这是对还是错 .

[编辑]将Google DNS服务器8.8.8.8添加到/etc/resolve.conf后 . apt-get更新工作正常 . 所以关闭这个帖子 .

[关闭]

1 回答

  • 1

    没有什么可以阻止您的VM访问互联网 . Azure中的虚拟机部署在 Cloud 服务中, Cloud 服务是负责在其他功能中分配公共IP的层 . 所有路由也是自动创建的,只要您不弄乱VM中的适配器配置,您就应该可以连接到Internet .

    确保将Azure VM中的网络配置保持为自动(DHCP) . 不要手动设置任何东西 . 您还应在VM配置之前配置虚拟网络,以组织基础架构并确保其他VM可以相互通信 .

    创建虚拟网络

    https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-create-a-vnet/

    如果您需要固定的私有IP或保留的公共IP:

    https://azure.microsoft.com/documentation/articles/virtual-networks-reserved-public-ip/

    也许你问这个是因为你熟悉亚马逊AWS . 在亚马逊中,您必须部署NAT服务器并为其分配弹性IP,但在Azure中,您无需执行任何操作即可获得Internet连接和公共IP .

    更新:

    Microsoft Lifecycle Services - Azure演示部署

    此特定演示部署依赖于域控制器 . 可能在此计算机上运行的DNS服务器未配置为转发外部DNS请求 . RDP到此VM并打开DNS管理器控制台 . 右键单击您的服务器名称>>选择属性>>选择转发器选项卡>>添加Google DNS 8.8.8.8,8.8.4.4,看看您是否可以立即浏览互联网 .

相关问题