-1

In my past experience, VM with only private ip (no public ip) cannot surf internet.

but today i create VM with only private ip.

i run this command for check "Invoke-WebRequest -Uri https://google.com -UseBasicParsing"

the result status code is 200 OK

i check this symptom more. i create vm with public ip, remote to private-vm throught public-vm and try to surf internet. it can surf.

Why is that?

private vm setting: private ip-->10.0.2.5

public vm setting: private ip-->10.0.2.4 public ip-->52.163.227.73

Topology

ip on public vm and private vm

private vm description

run invoke-webrequest in private vm

public vm description

1 Answers1

1

To quote from the documentation,

All resources in a VNet can communicate outbound to the internet, by default.

If you don't want internet access, you need to adjust your security policies.

Ron Trunk
  • 2,159
  • 1
  • 11
  • 19