실습 설정 안내 및 요구사항
계정과 진행 상황을 보호하세요. 이 실습을 실행하려면 항상 시크릿 브라우저 창과 실습 사용자 인증 정보를 사용하세요.

Configuring Traffic Blocklisting with Google Cloud Armor

실습 1시간 30분 universal_currency_alt 크레딧 5개 show_chart 입문
info 이 실습에는 학습을 지원하는 AI 도구가 통합되어 있을 수 있습니다.
이 콘텐츠는 아직 휴대기기에 최적화되지 않음
최상의 경험을 위해 데스크톱 컴퓨터에서 이메일로 전송된 링크를 사용하여 방문하세요.

Overview

Application Load balancing (HTTP/HTTPS) is implemented at the edge of Google's network in Google's points of presence (POP) around the world. User traffic directed to an Application Load Balancer enters the POP closest to the user and is then load balanced over Google's global network to the closest backend that has sufficient capacity available.

Google Cloud Armor IP blocklists/allowlists enable you to restrict or allow access to your Application Load Balancer at the edge of the Google Cloud, as close as possible to the user and to malicious traffic. This prevents malicious users or traffic from consuming resources or entering your virtual private cloud (VPC) networks.

In this lab, you will verify that an Application Load Balancer with global backends is deployed. This load balancer is automatically provisioned for you during startup. You will then create a VM to test access to the load balancer. Finally, you will stress test the load balancer and blocklist the stress test IP with Google Cloud Armor.

Objectives

In this lab, you will learn how to perform the following tasks:

  • Verify that an Application Load Balancer is deployed.
  • Create a VM to test access to the Application Load Balancer.
  • Use Google Cloud Armor to blocklist an IP address and restrict access to an Application Load Balancer.

Setup and requirements

For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

  1. Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:

    • The Open Google Cloud console button
    • Time remaining
    • The temporary credentials that you must use for this lab
    • Other information, if needed, to step through this lab
  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab Details panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab Details panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To view a menu with a list of Google Cloud products and services, click the Navigation menu at the top-left, or type the service or product name in the Search field. Navigation menu icon

Task 1. Verify the Application Load Balancer is deployed

In this task, you verify that the global Application Load Balancer is deployed. The Application Load Balancer is automatically created when you start the lab. This will be used for a simple web application. This application is deployed to demonstrate the capabilities of Google Cloud Armor.

  1. On the Google Cloud console title bar, click Activate Cloud Shell (Activate Cloud Shell icon). If prompted, click Continue, and then click Authorize.

  2. Verify that the load balancer is deployed and registered by executing the following command:

gcloud compute backend-services get-health web-backend --global Note: Rerun this command and wait until this command returns that three instances are HEALTHY. You can also monitor it in the console (Navigation menu > View All Products > Network services > Load balancing).
  1. Retrieve the load balancer IP address by executing the following command:
gcloud compute forwarding-rules describe web-rule --global
  1. Copy the value for the IPAddress property.

Keep track of this IP address. It will also be used in a later section.

  1. Open a new browser tab and try to visit that IP address http://{IP_ADDRESS}.

Replace {IP_ADDRESS} with the IP address of the load balancer. Do not include the curly braces when you are asked to provide the IP address.

If you get a message that the IP address doesn't support a secure connection, click Continue to site.

Keep refreshing the page until you see a page with a message similar to this:

Web server notification; the server is in zone X

Note: It might take a couple of minutes to access the Application Load Balancer. In the meantime, you might get 404 or 502 errors. Keep trying until you see the page of one of the backends.
  1. In Cloud shell, use the following curl command to access the IP address:
while true; do curl -m1 {IP_ADDRESS}; done

The responses will be from backends that have been created in different zones.

  1. Press CTRL+C to stop the previous command.

Task 2. Create a VM to test access to the load balancer

  1. In the Google Cloud console, in the Navigation menu (Navigation Menu icon), click Compute Engine > VM instances.

  2. Click Create instance.

  3. On the Machine configuration page, enter the following values:

    Field Value (type or select)
    Name access-test
    Region
    Zone
  4. Leave everything else at the default and click Create.

  5. Once launched, click the SSH button to connect to the instance.

  6. Run the following command on the instance to access the load balancer:

curl -m1 {IP_ADDRESS}

The output should look similar to:

<!doctype html><html><body><h1>Web server</h1><h2>This server is in zone: projects/104716457480/zones/{{{ project_0.default_zone | ZONE }}}</h2> </body></html>

Click Check my progress to verify the objective. Create a VM to test access to the load balancer.

Task 3. Create a security policy with Google Cloud Armor

Blocklist the access-test VM

Note: You will now create a security policy to blocklist access to the load balancer from the access-test VM. This policy can be used to block access from a malicious client. There are ways to identify the external IP address of a client trying to access your Application Load Balancer. For example, you could examine traffic captured by VPC Flow Logs in BigQuery to determine a high volume of incoming requests.
  1. In the Google Cloud console, in the Navigation menu (Navigation Menu icon), click Compute Engine > VM instances.
  2. Locate and copy the External IP address for the access-test VM. You will need this in the following steps.
  3. In the Google Cloud console, in the Navigation menu (Navigation Menu icon), click View all products> Networking > Network Security > Cloud Armor policies.
  4. Click Create policy.
  5. In the Name field, type blocklist-access-test, and then set the Default rule action to Allow.
  6. Click Next step.
  7. Click Add a rule.
  8. Set the following values, leave all other values at their defaults:

Property

Value

Mode

Basic mode (IP addresses/ranges only)

Match

Enter the External IP of the access-test VM

Action

Deny

Response code

404 (Not Found)

Priority

1000

Note: Notice that you are setting the Deny status to 404.
  1. Click Save change to rule.
  2. Click Next step.
  3. Click + Add target.
  4. For Type 1, select Backend service (external application load balancer).
  5. For Backend Service target 1, select web-backend.
  6. Click Next step.
  7. Click Done.
  8. Click Create policy.
Note: Alternatively, you could set the default rule to Deny and only allow list traffic from authorized users/IP addresses.

Wait for the policy to be created before moving to the next step.

Verify the security policy

  1. Return to the SSH session of the access-test VM.
  2. Run the curl command again on the instance to access the load balancer:
curl -m1 {IP_ADDRESS}

The output should look as follows.

Output:

<!doctype html><meta charset="utf-8"><meta name=viewport content="width=device-width, initial-scale=1"><title>404</title>404 Not Found Note: It might take a couple of minutes for the security policy to take affect. If you are able to access the backends, keep trying until you get the 404 Not Found error.
  1. Try accessing the load balancer IP from your local browser. You should still be able to access it as we have only blocklisted the access-test VM.

Click Check my progress to verify the objective. Create a security policy with Google Cloud Armor.

Task 4. View Google Cloud Armor logs

  1. In the Google Cloud console, in the Navigation menu (Navigation Menu icon), click View all products> Networking > Network Security > Cloud Armor policies.
  2. Click blocklist-access-test.
  3. Click Logs.
  4. Click View policy logs and go to the latest logs. If prompted, close the notification.
  5. Locate a log with a 404 and expand the log entry.
  6. Expand httpRequest.
  7. The request should be from the access-test VM IP address.
  8. Explore some of the other log entries.

Congratulations!

In this lab, you have done the following:

  • Verified that the Application Load Balancer was deployed.
  • Created a VM to test access to the Application Load Balancer.
  • Used Google Cloud Armor to blocklist an IP address and restrict access to an Application Load Balancer.

Take your next lab

If you are interested in progressing your knowledge on Cloud Armor, take the following course:

End your lab

When you have completed your lab, click End Lab. Google Skills removes the resources you’ve used and cleans the account for you.

You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.

The number of stars indicates the following:

  • 1 star = Very dissatisfied
  • 2 stars = Dissatisfied
  • 3 stars = Neutral
  • 4 stars = Satisfied
  • 5 stars = Very satisfied

You can close the dialog box if you don't want to provide feedback.

For feedback, suggestions, or corrections, please use the Support tab.

Copyright 2026 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

시작하기 전에

  1. 실습에서는 정해진 기간 동안 Google Cloud 프로젝트와 리소스를 만듭니다.
  2. 실습에는 시간 제한이 있으며 일시중지 기능이 없습니다. 실습을 종료하면 처음부터 다시 시작해야 합니다.
  3. 화면 왼쪽 상단에서 실습 시작을 클릭하여 시작합니다.

시크릿 브라우징 사용

  1. 실습에 입력한 사용자 이름비밀번호를 복사합니다.
  2. 비공개 모드에서 콘솔 열기를 클릭합니다.

콘솔에 로그인

    실습 사용자 인증 정보를 사용하여
  1. 로그인합니다. 다른 사용자 인증 정보를 사용하면 오류가 발생하거나 요금이 부과될 수 있습니다.
  2. 약관에 동의하고 리소스 복구 페이지를 건너뜁니다.
  3. 실습을 완료했거나 다시 시작하려고 하는 경우가 아니면 실습 종료를 클릭하지 마세요. 이 버튼을 클릭하면 작업 내용이 지워지고 프로젝트가 삭제됩니다.

현재 이 콘텐츠를 이용할 수 없습니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

감사합니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

한 번에 실습 1개만 가능

모든 기존 실습을 종료하고 이 실습을 시작할지 확인하세요.

시크릿 브라우징을 사용하여 실습 실행하기

이 실습을 실행하는 가장 좋은 방법은 시크릿 모드 또는 시크릿 브라우저 창을 사용하는 것입니다. 개인 계정과 학생 계정 간의 충돌로 개인 계정에 추가 요금이 발생하는 일을 방지해 줍니다.