Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
VPC-Firewallregeln (Virtual Private Cloud) gelten für ein einzelnes VPC-Netzwerk. Für eine genauere Kontrolle des Traffics, der von den VM-Instanzen in Ihrem VPC-Netzwerk gesendet oder empfangen wird, können Sie Netzwerk-Tags oder Dienstkonten in den VPC-Firewallregeln verwenden. Für VPC-Firewallregeln gelten jedoch die folgenden Einschränkungen:
Keine Batchbearbeitung: VPC-Firewallregeln werden regelbasiert angewendet und müssen einzeln bearbeitet werden, was ineffizient sein kann.
Eingeschränkte IAM-Steuerung (Identity and Access Management): Netzwerktags bieten nicht die robusten IAM-Steuerelemente, die für eine strenge Traffic-Segmentierung erforderlich sind.
Um die Einschränkungen von VPC-Firewallregeln zu beheben, unterstützt die Cloud Next Generation Firewall globale und regionale Netzwerk-Firewallrichtlinien. Sie können Netzwerk-Firewallrichtlinien für mehrere VPC-Netzwerke in mehreren Regionen definieren und anwenden. Diese Richtlinien unterstützen auch IAM-gesteuerte sichere Tags, mit denen Sie eine detaillierte Steuerung auf VM-Ebene für eine sichere und zuverlässige Mikrosegmentierung aller Arten von Netzwerk-Traffic erzwingen können.
Um den Zugriff auf Ihr VPC-Netzwerk zu steuern, können Sie Ihre vorhandenen VPC-Firewallregeln zu einer globalen Netzwerk-Firewallrichtlinie migrieren, um die Funktionen von Netzwerk-Firewallrichtlinien zu nutzen.
Vorteile der Migration von VPC-Firewallregeln zu einer Netzwerk-Firewallrichtlinie
Eine Netzwerk-Firewallrichtlinie bietet eine konsistente Firewall in der gesamtenGoogle Cloud -Ressourcenhierarchie und bietet mehrere betriebliche Vorteile gegenüber VPC-Firewallregeln.
Bietet detaillierte Sicherheits- und Zugriffssteuerung durch die Verwendung von IAM-gesteuerten Tags: Google Cloud Sie können jeder Netzwerkschnittstelle einer VM separate Tags zuweisen. Anhand der Tags können Sie Ihre Firewallrichtlinienregeln definieren, um unbefugten Zugriff auf Ihre Ressourcen und den Traffic Ihrer Arbeitslasten einzuschränken. So erhalten Sie eine detailliertere Kontrolle über Ihre Ressourcen, was dazu beiträgt, dass für jede Nutzergruppe oder Anwendung eine Umgebung mit dem geringsten Berechtigungsprinzip und Self-Service-Funktionen bereitgestellt wird. VPC-Firewallregeln verwenden Netzwerk-Tags, die keine IAM-Zugriffssteuerung unterstützen.
Vereinfachte Regelverwaltung: Netzwerk-Firewallrichtlinien unterstützen die Batchbearbeitung, mit der Sie mehrere Regeln innerhalb einer einzelnen Richtlinie bearbeiten können.
VPC-Firewallregeln funktionieren nur auf Regelebene.
Bedienkomfort: Netzwerk-Firewallrichtlinien unterstützen die Verwendung von Features wie FQDN-Objekten (voll qualifizierter Domainname), Standortbestimmungs-Objekten, Bedrohungserkennung, Einbruchsprävention und Adressgruppen.
VPC-Firewallregeln unterstützen diese erweiterten Funktionen nicht.
Unterstützung für flexible Datenstandorte: Netzwerk-Firewallrichtlinien können entweder auf mehrere Regionen oder auf eine einzelne Region eines Netzwerks angewendet werden.
VPC-Firewallregeln können nur global angewendet werden.
Migrationstool für VPC-Firewallregeln
Mit dem Migrationstool für VPC-Firewallregeln können VPC-Firewallregeln automatisch zu einer globalen Netzwerk-Firewallrichtlinie migriert werden. Das Tool ist ein Befehlszeilenprogramm, auf das Sie über die Google Cloud CLI zugreifen können.
Spezifikationen
Das Migrationstool erstellt eine globale Netzwerk-Firewallrichtlinie, konvertiert die vorhandenen VPC-Firewallregeln in Firewallrichtlinienregeln und fügt die neuen Regeln der Richtlinie hinzu.
Wenn zwei oder mehr VPC-Firewallregeln dieselbe Priorität haben, aktualisiert das Migrationstool die Regelprioritäten automatisch, um Überschneidungen zu vermeiden.
Eine Regel mit der Aktion deny hat eine höhere Priorität als eine Regel mit der Aktion allow.
Beim Aktualisieren der Prioritäten behält das Tool die relative Reihenfolge der ursprünglichen VPC-Firewallregeln bei.
Wenn Sie beispielsweise vier VPC-Firewallregeln mit der Priorität 1000 und eine fünfte Regel mit der Priorität 2000 haben, weist das Migrationstool den ersten vier Regeln eine eindeutige Prioritätsnummer durch die Sequenz 1000, 1001, 1002 und 1003 zu. Der fünften Regel mit der Priorität 2000 wird eine neue eindeutige Priorität von 1004 zugewiesen. So wird dafür gesorgt, dass die neuen Prioritäten für die ersten vier Regeln höher sind als die aller Regeln mit einer Priorität unter 1000.
Wenn Ihre VPC-Firewallregeln Abhängigkeiten wie Netzwerk-Tags oder Dienstkonten enthalten, kann das Migrationstool IAM-gesteuerte Tags nutzen, die als Ersatz für diese Netzwerk-Tags und Dienstkonten dienen.
Wenn Ihr VPC-Netzwerk VPC-Firewallregeln und eine zugehörige Netzwerk-Firewallrichtlinie enthält, werden mit dem Migrationstool die kompatiblen VPC-Firewallregeln sowie die Regeln der Netzwerk-Firewallrichtlinie in die neue globale Netzwerk-Firewallrichtlinie verschoben.
Das Migrationstool behält die Logeinstellungen der vorhandenen VPC-Firewallregeln bei. Wenn für eine VPC-Firewallregel Logging aktiviert ist, bleibt es vom Migrationstool aktiviert. Wenn das Logging deaktiviert ist, bleibt es vom Migrationstool deaktiviert.
Das Migrationstool generiert nur die globale Netzwerk-Firewallrichtlinie. Das Tool löscht keine vorhandenen VPC-Firewallregeln und verknüpft die neue globale Netzwerk-Firewallrichtlinie nicht mit dem erforderlichen VPC-Netzwerk. Sie müssen die globale Netzwerk-Firewallrichtlinie manuell mit dem erforderlichen VPC-Netzwerk verknüpfen und dann die Verknüpfung zwischen den VPC-Firewallregeln und dem VPC-Netzwerk entfernen.
Nachdem Sie die globale Netzwerk-Firewallrichtlinie mit dem erforderlichen VPC-Netzwerk verknüpft haben, können Sie die VPC-Firewallregeln deaktivieren, wenn die Richtlinienregeln in der globalen Netzwerk-Firewallrichtlinie wie vorgesehen funktionieren.
Bei Bedarf können Sie die neue globale Netzwerk-Firewallrichtlinie und die VPC-Firewallregeln demselben VPC-Netzwerk zuordnen, da die Regeln gemäß der Reihenfolge der Richtlinien- und Regelauswertung angewendet werden.
Wir empfehlen jedoch, die VPC-Firewallregeln zu deaktivieren.
Migrationsszenarien
Berücksichtigen Sie die folgenden Szenarien, wenn Sie Ihre VPC-Firewallregeln zu einer globalen Netzwerk-Firewallrichtlinie migrieren:
Das folgende Diagramm zeigt den Migrationsworkflow für die oben genannten Konfigurationskombinationen. Wählen Sie den Workflow aus, der Ihren Netzwerkanforderungen entspricht.
Abbildung 1. Ablauf der Migration von VPC-Firewallregeln (zum Vergrößern klicken)
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-14 (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)"]]