Allowing Traffic to the Compute Engine Instances
Because the website is listening on port 80, you need to allow traffic on this port for the Compute Engine instances. For security reasons, Google doesn't provide access to the 80 port by default. In this lab step, you will allow traffic on port 80 for the instances.
1. Navigate to the Compute Engine dashboard and click on one of the instances.
The instance details are displayed.
2. Scroll down until you reach the Network interfaces section:
3. Click on the name of the network interface.
You will be redirected to the VPC console.
4. Click on Firewall in the left panel:
5. Click on CREATE FIREWALL RULE.
6. Fill the form that appears as shown below (leave all other fields not mentioned here at their default values):
- Name: allowing-80
- Targets: All instances in the network
- Source IPv4 ranges: 0.0.0.0/0
- Protocols and ports:
- TCP: Checked
- Ports: 80
7. Click on CREATE.
In this lab step, you allowed traffic on port 80 for the instances.
Check that traffic on port 80 is allowed.