'How do I access to GCP vm from external if I set up later?
Environment:
Google Cloud Platform
Ubuntu 20.04 LTS
I've created below environment on GCP.
- I've created: network
nw1(for ssh from external),nw2(private),nw3(public) - I've created
vm1(nic withnw1,nw2,ExternalIPinnw1) - I can access
vm2usingExternalIPfrom external my machine - I've created
vm2(nic withnw2,nw3withoutExternalIP) - I can access
vm2via ssh tovm1and then ssh vianw2 - I've created new
ExternalIPtonw3and setvm2 - Now I cannot access (icmp, ssh, etc.)
vm2vianw3(Firewall allows all traffic form0.0.0.0/0)
What should I change?
Solution 1:[1]
I still don't fully understand your setup, however, in order to allow communication between subnetworks, firewall rules must permit two-way communication.
So for example:
Firewall in NW2 must allow packets from NW3
AND
Firewall in NW3 must allow packets from NW2
It can be helpful to enable Firewall logging and trace the packets to find where they are being dropped.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sergiusz |
