【Google Cloud 教學】如何使用 Cloud Load Balancer + Cloud Armor 限制流量與增強 GCP 安全性

情境

Google Cloud (舊稱:GCP) 是否有提供透過 Cloud Load Balancer + Cloud Armor 的方式來限制流量?

操作

您可透過 Google Cloud Armor 來達到您想限制特定來源 IP 存取的目的,建立安全策略 (Create security policy) 且設定要限制的 IP 並將其規則分配給 HTTP(S) 附載平衡器,以達到限制特定 IP 存取。


啟用 Cloud Armor 會收取額外的費用,以下是 Cloud Armor Standard Tier 的收費方式:


(1) WAF HTTP 請求

(2) WAF 安全政策

(3) WAF 規則


Cloud Armor Standard Tier 會依照 WAF HTTP requests, WAF security policies 和 WAF rules 的數量多寡來收取費用,建議您如果想限制流量可先 block all user 再開白名單。


另外 Cloud Armor 生效大約需要 5 分鐘,請測試後再更新至正式環境以避免無法連線。

Managed Protection

Standard VS Managed Protection Plus


我們可以總結兩者的差異在於多了兩個進階的功能(Named IP Lists 和 Adaptive Protection)。


  1. Named IP Lists 是 Cloud Armor 整合第三方廠商 (目前有 Fastly, CloudFlare, Imperva)的 IP 名單,讓您不需要在 Cloud Armor 針對像是 CloudFlare 的 IP 或是 IP 網段進行一一的配置。
  2. Adaptive Protection 是 GCP 使用機器學習等等的技術幫助您 monitor 目前潛在的安全危機。透過機器學習持續分析您的系統,然後當發現可能攻擊的行為時會跳出 alert 並給您建議的規則,讓您能夠加入到 Cloud Armor 的 rules 中。
  3. Standard 版本 : 就是一般用多少付多少的機制,一般 WAF rule 做使用,可以使用Adaptive Protection 但只有基本的儀表板功能(沒有 alert 、建議的 rules 等等功能)。
  4. Plus 版本:一年訂閱方案配套,除了 Standard 版本有的之外,還有 named IP address list 跟完整的 Adaptive Protection 功能等等。

Log

觀察被 deny 的 request URL pattern


resource.type="http_load_balancer" previewSecurityPolicy


resource.type="http_load_balancer"


jsonPayload.previewSecurityPolicy.outcome="DENY"

Contact CloudMile

Contact Us

Proven Experience Across Diverse Industries

Phone Number

  • TW+886
  • TW+886
  • Reason for Inquiry

  • Electrum Advisory

  • MileInfra - Cloud Infrastructure Modernization

  • Enterprise Technical Training

  • MileSec - Multi-Cloud Security and Operations

  • MileData - Cloud Data Management and Automation

  • MileOps - Hybrid and Multi-Cloud Operations

  • MileAI - Generative AI Applications and Innovation

  • LumiTure.ai AI-Powered FinOps Platform

  • Other

  • 請填寫電子信箱