简体   繁体   English

我可以在没有公共 IP 的情况下为 azure VM 提供互联网访问权限吗?

[英]Can I give internet access to a azure VM, without a public IP?

I have 3 debian VM on azure, one of them have a public IP with which it goes online (VM_1), and the others only have the internal network(VM_2, VM_3).我在 azure 上有 3 个 debian VM,其中一个有一个可以上网的公共 IP(VM_1),其他的只有内部网络(VM_2、VM_3)。

Can I give access to my VM_2 or VM_3, through the VM_1?我可以通过 VM_1 授予对 VM_2 或 VM_3 的访问权限吗?

What broke me was to see that VM_1 has 2 network interfaces, private and public, but if I enter the configuration file there are only 2 interfaces, lo and eth0, and eth0 contains the private IP...让我崩溃的是看到 VM_1 有 2 个网络接口,私有和公共,但如果我进入配置文件只有 2 个接口,lo 和 eth0,而 eth0 包含私有 IP...

Can i do something, or i need to pay for another public IP assigned by azure?我可以做些什么,还是需要为 azure 分配的另一个公共 IP 付费?

I want to add some info: My subnet我想添加一些信息:我的子网

VM_1 with public and private IP, can download files. VM_1 具有公私IP,可以下载文件。

VM_2 and 3, with private IP but without Public IP, can't. VM_2 和 3,具有私有 IP 但没有公共 IP,不能。

Your question is possible via Azure Virtual NAT .您的问题可以通过Azure 虚拟 NAT 解决 You can assign IPs to the NAT gateway and in the subnet you reference the NAT gateway.您可以将 IP 分配给 NAT 网关,并在子网中引用 NAT 网关。 By this way all the VMs in the subnet can reach Internet via the NAT gateway IP addresses.通过这种方式,子网中的所有虚拟机都可以通过 NAT 网关 IP 地址访问 Internet。

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

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