가상 프라이빗 클라우드(VPC) 방화벽 규칙은 단일 VPC 네트워크에 적용됩니다. VPC 네트워크의 가상 머신 (VM) 인스턴스에서 전송 또는 수신되는 트래픽을 더 세밀하게 제어하기 위해 VPC 방화벽 규칙에서 네트워크 태그 또는 서비스 계정를 사용할 수 있습니다. 하지만 VPC 방화벽 규칙에는 다음과 같은 제한사항이 있습니다.
일괄 수정 없음: VPC 방화벽 규칙은 규칙별로 적용되고 개별적으로 수정해야 하므로 비효율적일 수 있습니다.
제한된 Identity and Access Management(IAM) 제어: 네트워크 태그는 엄격한 트래픽 세분화에 필요한 강력한 IAM 제어를 제공하지 않습니다.
VPC 방화벽 규칙의 제한사항을 해결하기 위해 Cloud Next Generation Firewall은 전역 및 리전 네트워크 방화벽 정책을 지원합니다. 여러 리전에 있는 여러 VPC 네트워크에 네트워크 방화벽 정책을 정의하고 적용할 수 있습니다. 이러한 정책은 VM 수준에서 세밀하게 제어할 수 있도록 하는 IAM 적용 보안 태그도 지원하므로 모든 유형의 네트워크 트래픽의 안전하고 안정적으로 세분화할 수 있습니다.
VPC 네트워크에 대한 액세스를 제어하려면 네트워크 방화벽 정책 기능을 활용하기 위해 기존 VPC 방화벽 규칙을 전역 네트워크 방화벽 정책으로 마이그레이션할 수 있습니다.
VPC 방화벽 규칙을 네트워크 방화벽 정책으로 마이그레이션하는 이점
네트워크 방화벽 정책은Google Cloud 리소스 계층 구조에서 일관된 방화벽 환경을 제공하며 VPC 방화벽 규칙에 비해 여러 가지 운영 이점을 제공합니다.
IAM 적용 태그를 사용하여 세밀한 보안 및 액세스 제어 제공: Google Cloud 에서는 VM의 각 네트워크 인터페이스에 별개의 태그를 연결할 수 있습니다. 태그를 기반으로 방화벽 정책 규칙을 정의하여 리소스 및 워크로드 트래픽에 대한 무단 액세스를 제한할 수 있습니다. 따라서 리소스를 보다 세밀하게 제어할 수 있으므로 각 사용자 그룹 또는 애플리케이션에 대한 최소 권한의 셀프서비스 환경을 보장할 수 있습니다. VPC 방화벽 규칙은 IAM 액세스 제어를 지원하지 않는 네트워크 태그를 사용합니다.
간소화된 규칙 관리 사용 설정: 네트워크 방화벽 정책은 일괄 수정을 지원하므로, 단일 정책 내에서 여러 규칙을 수정할 수 있습니다.
VPC 방화벽 규칙은 규칙별 수준에서만 작동합니다.
운영 편의성 제공: 네트워크 방화벽 정책은 정규화된 도메인 이름(FQDN) 객체, 위치정보 객체, 위협 감지, 침입 방지, 및 주소 그룹과 같은 기능 사용을 지원합니다.
VPC 방화벽 규칙은 이러한 고급 기능을 지원하지 않습니다.
유연한 데이터 상주 지원: 네트워크 방화벽 정책은 네트워크의 여러 리전 또는 단일 리전에 적용할 수 있습니다.
VPC 방화벽 규칙은 전역적으로만 적용할 수 있습니다.
VPC 방화벽 규칙 마이그레이션 도구
VPC 방화벽 규칙 마이그레이션 도구는 VPC 방화벽 규칙을 전역 네트워크 방화벽 정책에 자동으로 마이그레이션할 수 있습니다. 이 도구는 Google Cloud CLI를 사용하여 액세스할 수 있는 명령줄 유틸리티입니다.
사양
마이그레이션 도구는 전역 네트워크 방화벽 정책을 만들고, 기존 VPC 방화벽 규칙을 방화벽 정책 규칙으로 변환하고, 새 규칙을 정책에 추가합니다.
둘 이상의 VPC 방화벽 규칙 우선순위가 같으면 마이그레이션 도구는 중복을 피하기 위해 규칙 우선순위를 자동으로 업데이트합니다.
allow 작업이 있는 규칙보다 deny 작업이 있는 규칙에 더 높은 우선순위가 부여됩니다.
이 도구는 우선순위를 업데이트하는 동안 원래 VPC 방화벽 규칙의 상대적 순서를 유지합니다.
예를 들어 우선순위가 1000인 VPC 방화벽 규칙 4개와 우선순위가 2000인 다섯 번째 규칙이 있다고 가정하면 마이그레이션 도구는 처음 4개의 규칙에 고유한 우선순위 번호를 1000, 1001, 1002, 1003의 순서대로 할당합니다. 우선순위가 2000인 다섯 번째 규칙에는 새로운 고유한 우선순위 1004가 할당됩니다. 이렇게 하면 처음 4개 규칙의 새 우선순위가 1000보다 낮은 우선순위의 모든 규칙보다 높아집니다.
VPC 방화벽 규칙에 네트워크 태그 또는 서비스 계정과 같은 종속 항목이 포함된 경우 이러한 네트워크 태그 및 서비스 계정의 대안으로 작동하는 IAM 적용 태그를 마이그레이션 도구에 활용할 수 있습니다.
VPC 네트워크에 VPC 방화벽 규칙 및 연결된 네트워크 방화벽 정책이 포함된 경우 마이그레이션 도구는 호환되는 VPC 방화벽 규칙과 네트워크 방화벽 정책 규칙을 새로운 전역 네트워크 방화벽 정책으로 이동합니다.
마이그레이션 도구는 Google Kubernetes Engine(GKE)과 같은 Google 서비스에서 자동으로 생성된 VPC 방화벽 규칙을 마이그레이션하지 않습니다. 이러한 규칙은 네트워크에서 VPC 방화벽 규칙으로 계속 사용됩니다. 따라서 VPC 네트워크에 GKE 리소스가 포함된 경우 Google Cloud지원팀에 문의하여 GKE 생성 VPC 방화벽 규칙을 마이그레이션하기 위한 최적의 전략을 확인합니다.
마이그레이션 도구는 기존 VPC 방화벽 규칙의 로그 설정을 보존합니다. VPC 방화벽 규칙에 로깅이 사용 설정되었으면 마이그레이션 도구도 로깅 사용을 유지합니다. 로깅이 사용 중지되면 마이그레이션 도구도 로깅 사용을 중지합니다.
이 마이그레이션 도구는 전역 네트워크 방화벽 정책만 생성합니다. 이 도구는 기존 VPC 방화벽 규칙을 삭제하거나 새 전역 네트워크 방화벽 정책을 필요한 VPC 네트워크에 연결하지 않습니다. 전역 네트워크 방화벽 정책을 필요한 VPC 네트워크에 수동으로 연결한 후 VPC 방화벽 규칙과 VPC 네트워크 사이의 연결을 삭제해야 합니다.
전역 네트워크 방화벽 정책을 필요한 VPC 네트워크에 연결한 후 전역 네트워크 방화벽 정책의 정책 규칙이 의도한 대로 작동할 경우에는 VPC 방화벽 규칙을 사용 중지할 수 있습니다.
규칙이 정책 및 규칙 평가 순서에 따라 적용되기 때문에 필요한 경우에는 VPC 방화벽 규칙뿐만 아니라 새 전역 네트워크 방화벽 정책을 동일한 VPC 네트워크에 연결할 수 있습니다.
하지만 VPC 방화벽 규칙은 사용 중지하는 것이 좋습니다.
마이그레이션 시나리오
VPC 방화벽 규칙을 전역 네트워크 방화벽 정책으로 마이그레이션할 때는 다음 시나리오를 고려하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-30(UTC)"],[[["\u003cp\u003eVPC firewall rules are limited to a single VPC network and lack batch editing capabilities and robust IAM controls, unlike network firewall policies.\u003c/p\u003e\n"],["\u003cp\u003eNetwork firewall policies offer enhanced control through IAM-governed secure tags, allowing for detailed micro-segmentation of network traffic at the VM level.\u003c/p\u003e\n"],["\u003cp\u003eNetwork firewall policies enable simplified management through batch editing, along with advanced features like FQDN and geolocation objects, which are not supported by VPC firewall rules.\u003c/p\u003e\n"],["\u003cp\u003eThe VPC firewall rules migration tool facilitates the conversion of existing VPC firewall rules into a global network firewall policy, automatically managing priorities and preserving log settings.\u003c/p\u003e\n"],["\u003cp\u003eMigrating to a global network firewall policy allows for greater flexibility in data residency, as it can be applied to multiple or single regions, whereas VPC firewall rules are applied globally.\u003c/p\u003e\n"]]],[],null,["# VPC firewall rules migration overview\n\nVirtual Private Cloud (VPC) firewall rules apply to a single VPC\nnetwork. To have finer control over the traffic sent or received by the virtual\nmachine (VM) instances in your VPC network, you can use\n[network tags](/vpc/docs/add-remove-network-tags) or [service accounts](/iam/docs/service-account-overview)\nin the VPC firewall rules. However, VPC firewall\nrules have the following limitations:\n\n- **No batch editing**: VPC firewall rules are applied on a\n per-rule basis and must be edited individually, which can be inefficient.\n\n- **Limited Identity and Access Management (IAM) control**: Network tags don't offer the\n robust IAM controls needed for strict traffic segmentation.\n\nTo address the limitations of VPC firewall rules,\nCloud Next Generation Firewall supports global and regional network firewall\npolicies. You can define and apply network firewall policies to multiple\nVPC networks across multiple regions. These policies also support\nIAM-governed [secure tags](/firewall/docs/tags-firewalls-overview) that let you enforce granular\ncontrol at the VM level for safe and reliable micro-segmentation of all types of\nnetwork traffic.\n\nFor more information, see [Benefits of migrating VPC firewall rules to a network firewall policy](#benefits).\n\nTo control access to your VPC network, you can migrate your existing VPC firewall rules to a global network firewall policy to take advantage of the capabilities of network firewall policies.\n\nBenefits of migrating VPC firewall rules to a network firewall policy\n---------------------------------------------------------------------\n\nA network firewall policy delivers a consistent firewall experience across the\nGoogle Cloud resource hierarchy and offers multiple operational benefits over\nVPC firewall rules.\n\n- **Provides granular security and access control by using IAM\n governed Tags**. Google Cloud lets you attach separate Tags to each\n network interface of a VM. Based on the Tags, you can define your firewall\n policy rules to restrict unauthorized access to your resources and workload\n traffic. So, you gain a finer level of control over your resources, which\n helps to ensure a least-privilege, self-service environment for each user\n group or application. VPC firewall rules use network tags,\n which don't support IAM access control.\n\n- **Enables simplified rule management**. Network firewall policies support\n batch editing, which lets you edit multiple rules within a single policy.\n VPC firewall rules operate only at a per-rule level.\n\n- **Provides ease of operations**. Network firewall policies support the use\n of features, such as fully qualified domain name (FQDN) objects,\n geolocation objects, threat detection, intrusion prevention, and address groups.\n VPC firewall rules don't support these advanced features.\n\n- **Supports flexible data residency**. Network firewall policies can be\n applied to either multiple regions or a single region of a network.\n VPC firewall rules can only be applied globally.\n\nVPC firewall rules migration tool\n---------------------------------\n\nThe VPC firewall rules migration tool can automatically migrate\nVPC firewall rules to a global network firewall policy. The tool\nis a command-line utility that you can access using the Google Cloud CLI.\n\n### Specifications\n\n- The migration tool creates a global network firewall policy, converts the\n existing VPC firewall rules into firewall policy rules, and\n adds the new rules to the policy.\n\n- If two or more VPC firewall rules have the same priority, the\n migration tool automatically updates the rule priorities to avoid any overlap.\n A rule with a `deny` action is given a higher priority than a rule with an `allow` action.\n While updating the priorities, the tool preserves the relative sequence of the\n original VPC firewall rules.\n\n For example, if you have four VPC firewall rules with a priority\n of `1000` and a fifth rule with a priority of `2000`, the migration tool\n assigns a unique priority number to the first four rules with the\n sequence---`1000`, `1001`, `1002`, and `1003`. The fifth rule with the\n priority of `2000` is assigned a new unique priority of `1004`. This ensures\n that the new priorities for the first four rules are higher than that of all\n rules that have priority lower than `1000`.\n | **Note:** Before you attach the new global network firewall policy to a VPC network, review the new priorities and make sure that the automatically generated priorities align with your original VPC network configuration.\n- If your VPC firewall rules contain dependencies, such as network\n tags or service accounts, the migration tool can take advantage of\n IAM-governed Tags that serve as a replacement to those network\n tags and services accounts.\n\n- If your VPC network contains VPC firewall\n rules and an associated network firewall policy, the migration tool moves\n the compatible VPC firewall rules as well as the network\n firewall policy rules to the new global network firewall policy.\n\n- The migration tool preserves the log settings of the existing VPC\n firewall rules. If a VPC firewall rule has logging turned on,\n the migration tool keeps it on. If logging is off, the migration tool keeps it turned off.\n\n- The migration tool generates the global network firewall policy only. The\n tool does not delete existing VPC firewall rules or associate\n the new global network firewall policy with the required VPC\n network. You must manually associate the global network firewall policy with\n the required VPC network, and then remove the association\n between the VPC firewall rules and the VPC\n network.\n\n- After you associate the global network firewall policy with the required\n VPC network, you can disable the VPC firewall\n rules if the policy rules in the global network firewall policy are working\n as intended.\n\n If necessary, you can associate the new global network firewall policy as well\n as the VPC firewall rules with the same VPC\n network because the rules are applied according to the [policy and rule\n evaluation order](/vpc/docs/firewall-policies-overview#rule-evaluation).\n However, we recommend you disable the VPC firewall rules.\n\nMigration scenarios\n-------------------\n\nConsider the following scenarios when you migrate your VPC firewall\nrules to a global network firewall policy:\n\n- [VPC firewall rules don't contain network tags or service accounts](/firewall/docs/migrate-firewall-rules-no-dependencies).\n- [VPC firewall rules contain network tags or target service accounts, or both](/firewall/docs/migrate-firewall-rules-with-dependencies).\n\nThe following diagram shows the migration workflow for the preceding configuration\ncombinations. Choose the workflow that matches your network requirements.\n[](/static/firewall/images/vpc-rules-migration.png) **Figure 1.** VPC firewall rules migration flow (click to enlarge).\n\nWhat's next\n-----------\n\n- [Migrate VPC firewall rules that don't use network tags and service accounts](/firewall/docs/migrate-firewall-rules-no-dependencies)\n- [Migrate VPC firewall rules that use network tags and service accounts](/firewall/docs/migrate-firewall-rules-with-dependencies)"]]