Challenge 0 - Setup & Requirements

Home - Next Challenge>

Introduction

Thank you for participating in the Security in Media & Entertainment gHack. Before you can hack, you will need to set up a few prerequisites.

Description

Setup Your Project

  1. Sign-in to the Google Cloud Console and create a new project or reuse an existing one. If you don’t already have a Gmail or Google Workspace account, you must create one.

    Select a project New project button New project

  1. Next, you’ll need to enable billing in the Cloud Console in order to use Cloud resources/APIs. Running through this gHack shouldn’t cost much, if anything at all. To shut down resources so you don’t incur billing beyond this tutorial, follow any “clean-up” instructions found at the end of this gHack. New users of Google Cloud are eligible for the $300 USD Free Trial program.

Start the Cloud Shell

While Google Cloud can be operated remotely from your laptop, in this gHack you will be using the Google Cloud Shell, a command line environment running in the Cloud.

Setup Cloud Shell

Create the default VPC Network

NOTE: Normally you should already have a default network defined with auto-subnet creation turned on.

If it does not already exist in your project, you can create one using this command:

gcloud compute networks create default \
    --subnet-mode=auto \
    --bgp-routing-mode=global 

Configure Firewall Rules

Configure firewall rules to allow HTTP traffic to the backends from the Google Cloud health checks and the Load Balancer. Also, configure a firewall rule to allow SSH into the instances.

We will be using the default VPC network created in your project. Create a firewall rule to allow HTTP traffic to the backends. Health checks determine which instances of a load balancer can receive new connections. For HTTP load balancing, the health check probes to your load balanced instances come from addresses in the ranges 130.211.0.0/22 and 35.191.0.0/16. Your VPC firewall rules must allow these connections. Also, the load balancers talk to the backend on the same IP range.

  1. In the Cloud Console, navigate to Navigation at the top left and go to: VPC network > Firewall.

    Networking menu

  2. Notice the existing ICMP, internal, RDP, and SSH firewall rules.Each Google Cloud project starts with the default network and these firewall rules.

  3. Click Create Firewall Rule.

  4. Set the following values, leave all other values at their defaults:

    Property Value
    Name default-allow-health-check
    Network default
    Targets Specified target tags
    Target tags allow-health-check
    Source filter IP Ranges
    Source IP ranges 130.211.0.0/22, 35.191.0.0/16
    Protocols and ports Specified protocols and ports, and then check tcp. Type 80 for port number

    Make sure to enter the two Source IP ranges one-by-one and press SPACE in between them.

  5. Click Create

Success Criteria