Forwarding rules overview

A forwarding rule specifies how to route network traffic to the backend servicesof a load balancer. A forwarding rule includes an IP address, an IP protocol,and one or more ports on which the load balancer accepts traffic. SomeGoogle Cloud load balancers limit you to apredefined set ofports, and others let you specify arbitrary ports.

A forwarding rule and its corresponding IP address represent the frontendconfiguration of a Google Cloud load balancer.

Depending on the load balancer type, the following is true:

In addition, global and regional forwarding rules can be designated as servicesinApp Hub applications.

Note: Forwarding rules are also used forprotocolforwarding,Classic VPN gateways, andCloud Service Mesh to provide forwardinginformation in the control plane. This page only discusses forwarding rules inthe context of Google Cloud load balancers.

Internal forwarding rules

Internal forwarding rules forward traffic thatoriginates inside a Google Cloud network. The clients can be in the sameVirtual Private Cloud (VPC) network as the backends, or the clients can be in aconnected network.

Internal forwarding rules are used by the following Google Cloud loadbalancers:

  • Internal Application Load Balancer
  • Internal proxy Network Load Balancer
  • Internal passthrough Network Load Balancer

Internal Application Load Balancer

The internal Application Load Balancer supports IPv4 traffic using either the HTTP, HTTPS, or HTTP/2protocols.

The scope of the forwarding rule depends on the type of load balancer:

  • Eachregional internal Application Load Balancer has at least one regional internal forwardingrule. The regional internal forwarding rule points to the load balancer'sregional target HTTP or HTTPS proxy. The forwarding rule is associated with aregional internal IP address.
  • Eachcross-region internal Application Load Balancer has at least one global internal forwardingrule. The global internal forwarding rule points to the load balancer's globaltarget HTTP or HTTPS proxy. The global forwarding rule is configured with aregional internal IP address and associated with a regional subnet;whereas, a global external Application Load Balancer has a global forwarding rule that has aglobal anycast IP address.

Internal managed forwarding rules connected to a target HTTP(S) proxy supportany port number between 1 and 65535 inclusive.

As an example, the following diagram shows how a forwarding rule fits into theregional internal Application Load Balancer architecture.

Regional internal Application Load Balancer forwarding rule.
Regional internal Application Load Balancer forwarding rule (click to enlarge).

For more information about internal Application Load Balancers, see the following pages:

Internal proxy Network Load Balancer

With an internal proxy Network Load Balancer, the supported traffic type is IPv4, and thesupported protocol is TCP.

The scope of the forwarding rule depends on the type of load balancer:

  • Eachregional internal proxy Network Load Balancer has at least one regional internalforwarding rule. The forwarding rule specifies an internal IP address, port,and regional target TCP proxy. Clients use the IP address and port to connectto the load balancer's Envoy proxies—the forwarding rule's IP address isthe IP address of the load balancer (sometimes called a virtual IP address orVIP).
  • Eachcross-region internal proxy Network Load Balancer has at least one global internal forwardingrule. The global internal forwarding rule points to the load balancer's globaltarget TCP proxy. The global forwarding rule is configured with aregional internal IP address and associated with a regional subnet.

Internal managed forwarding rules connected to a target TCP proxy supportany port number between 1 and 65535 inclusive.

The following diagram shows how a forwarding rule fits into theregional internal proxy Network Load Balancer architecture.

Regional internal proxy Network Load Balancer forwarding rule.
Regional internal proxy Network Load Balancer forwarding rule (click to enlarge).

For more details about internal proxy Network Load Balancers, see the following pages:

Internal passthrough Network Load Balancer

With an internal passthrough Network Load Balancer, the supported traffic types areeither IPv4 or IPv6.For information about the supported protocols, seeForwarding rule protocols.

Each internal passthrough Network Load Balancer has at least one regional internalforwarding rule. The regional internal forwarding rules point to the loadbalancer's regional internal backend service. The following diagram shows how aforwarding rule fits into the internal passthrough Network Load Balancer architecture.

Internal passthrough Network Load Balancer forwarding rule.
Internal passthrough Network Load Balancer forwarding rule (click to enlarge).

The following diagram shows how the load balancer componentsfit within a subnet and region.

The internal forwarding rule must be defined in a region and a subnet.The backend service only needs to correspond to that region.

High-level internal passthrough Network Load Balancer example.
High-level internal passthrough Network Load Balancer example (click to enlarge).

For more information about internal passthrough Network Load Balancers, see the following pages:

External forwarding rules

External forwarding rules accept traffic from client systems that have internetaccess, including:

  • A client outside of Google Cloud
  • A Google Cloud VM with an external IP address
  • A Google Cloud VM without an external IP address usingCloud NAT or an instance-based NAT system
Note: For an on-premises network connected through Cloud VPN orCloud Interconnect, use aninternal forwardingrule with an internal passthrough Network Load Balancer or internal Application Load Balancer.

External forwarding rules are used by the following Google Cloud loadbalancer types:

  • External Application Load Balancer
  • External proxy Network Load Balancer
  • External passthrough Network Load Balancer

External Application Load Balancer

For external Application Load Balancers, the forwarding rule and IP address depend on theload balancer mode, and theNetwork Service Tiers that you select for the load balancer.

In an external Application Load Balancer, a forwarding rule points to a target HTTP(S) proxy.External forwarding rules connected to a target HTTP(S) proxy support any portnumber between 1 and 65535 inclusive.

  • The global external Application Load Balancer supports only Premium Tier.
  • Each classic Application Load Balancer can be Premium Tier or Standard Tier.
  • The regional external Application Load Balancer supports both Premium and Standard Tier.

IP address and forwarding rule requirements change depending on the NetworkService Tier:

  • In Premium Tier, global external Application Load Balancers and classic Application Load Balancers use aglobal external IP address, which can be either IPv4 or IPv6, and a globalexternal forwarding rule. You can provide a globally accessible applicationthat directs end users to backends in the closest region and distributestraffic among multiple regions. Because a global external forwarding rule usesa single external IP address, you don't need to maintain separate DNS recordsin different regions or wait for DNS changes to propagate.

    You can have two different global external IP addresses pointing to the sameglobal external Application Load Balancer. For example, in Premium Tier, the global external IP addressfor one forwarding rule can be IPv4, and the global external IP address for asecond forwarding rule can be IPv6. Both forwarding rules can point to thesame target proxy. As a result, you can provide both an IPv4 and an IPv6address for the same external Application Load Balancer. For more information, see theIPv6termination documentation.

  • In Premium Tier, regional external Application Load Balancers use a regional external IPv4address and a regional external forwarding rule.

  • In Standard Tier, regional external Application Load Balancers andclassic Application Load Balancers use a regional external IPv4address and a regional external forwarding rule. A load balancer in StandardTier can only distribute traffic to backends within a single region.

The following diagram shows how a global forwarding rule fits into thearchitecture for a global external Application Load Balancer. The same architecture also appliesto the classic Application Load Balancer in Premium Tier.

Global external Application Load Balancer forwarding rule.
Global external Application Load Balancer forwarding rule (click to enlarge).
Note: It is possible to attachEXTERNAL_MANAGED backend services toEXTERNAL forwarding rules. However,EXTERNAL backendservices cannot be attached toEXTERNAL_MANAGED forwarding rules.To take advantage ofnew features availableonly with the global external Application Load Balancer, werecommend that you migrate your existingEXTERNAL resources toEXTERNAL_MANAGED by using the migration process described atMigrateresources from classic to global external Application Load Balancer.

For more information about external Application Load Balancers, see theExternal Application Load Balancer overview.

External proxy Network Load Balancer

An external proxy Network Load Balancer offers TCP proxying capability, with optional SSLoffload. An external proxy Network Load Balancer is similar to an external Application Load Balancer because it canterminate SSL (TLS) sessions. However, these load balancers don't supportpath-based redirection like external Application Load Balancers, so they're better suited forhandling SSL for protocols other than HTTPS, such as IMAP or WebSockets overSSL. In an external proxy Network Load Balancer, a forwarding rule points to either a TCP or anSSL target proxy.

External proxy Network Load Balancers support both Premium Tier and Standard Tier. Theforwarding rule and IP address depend on the type of load balancer mode and theNetwork Service Tiers that you select for the load balancer:

  • The classic proxy Network Load Balancer can be Premium Tier or Standard Tier.
  • The global external proxy Network Load Balancer supports only Premium Tier.
  • The regional external proxy Network Load Balancer supports both Premium and Standard Tier.

IP address and forwarding rule requirements change depending on the NetworkService Tier:

  • In Premium Tier, global external proxy Network Load Balancers andclassic proxy Network Load Balancers use a global external IP address, which can beeither IPv4 or IPv6, and a global external forwarding rule. You can provide aglobally accessible application that directs end users to backends in theclosest region and distributes traffic among multiple regions. Because aglobal external forwarding rule uses a single external IP address, you don'thave to maintain separate DNS records in different regions or wait for DNSchanges to propagate.

    It is possible to have two different global external IP addresses pointing tothe same external proxy Network Load Balancer. For example, in Premium Tier, the globalexternal IP address for one forwarding rule can be IPv4, and the globalexternal IP address for a second forwarding rule can be IPv6. Both forwardingrules can point to the same target proxy. As a result, you can provide both anIPv4 and an IPv6 address for the same external proxy Network Load Balancer. For moreinformation, see theIPv6 terminationdocumentation.

  • In Premium Tier, regional external proxy Network Load Balancers use a regional externalIPv4 address and a regional external forwarding rule.

  • In Standard Tier, regional external proxy Network Load Balancers andclassic proxy Network Load Balancers use a regional external IPv4 address and aregional external forwarding rule. A load balancer in StandardTier can only distribute traffic to backends within a single region.

External forwarding rules connected to a target TCP or SSL proxy supportany port number between 1 and 65535 inclusive.

The following diagram shows how a forwarding rule fits into theglobal external proxy Network Load Balancer architecture.

Global external proxy Network Load Balancer forwarding rule.
Global external proxy Network Load Balancer forwarding rule (click to enlarge).

For more information about external proxy Network Load Balancers, see theExternal proxy Network Load Balancer overview.For information about configuring external proxy Network Load Balancers, seeSet up an external proxy Network Load Balancer.

External passthrough Network Load Balancer

External passthrough Network Load Balancers is a pass-through load balancer that distributestraffic among backend instances in a single region.An external passthrough Network Load Balancer uses a regional external forwarding rule and a regionalexternal IP address. The regional external IP address can beaccessed from anywhere on the internet and by Google Cloud VMs with internet access.

For backend service-based external passthrough Network Load Balancers, the regional external forwardingrule points to abackendservice.Backend service-based external passthrough Network Load Balancers support TCP, UDP, ESP, GRE, ICMP, and ICMPv6traffic. For details, seeForwarding rule protocolsfor backend service-basedexternal passthrough Network Load Balancers.Forwarding rules for backend service-based load balancers can beconfigured witheither IPv4 or IPv6addresses.Forwarding rules for backend service-based external passthrough Network Load Balancers support thefollowing advanced features:

  • Direct traffic coming from a specific range of source IP addressesto a specific backend service. For more information,seeTraffic steering.
  • Distribute traffic across the load balancer's backend instances based on theweights reported by an HTTP health check usingWeighted load balancing.

For target pool-based external passthrough Network Load Balancers, the forwarding rule points to atarget pool. A targetpool-based external passthrough Network Load Balancer supports only TCP or UDP traffic. Forwarding rulesfor target pool-based external passthrough Network Load Balancer support only IPv4 addresses.

For regional external IPv4 addresses, the external passthrough Network Load Balancer supportsboth Standard Tier and Premium Tier. Regional external IPv6 addresses are onlyavailable in the Premium Tier.

To support backend instances in more than one region, you must create aexternal passthrough Network Load Balancer in each region. This is the case regardless ofwhether the IP address of the load balancer is in the Premium Tier or theStandard Tier.

The following figure shows an external passthrough Network Load Balancer which has a regional externalforwarding rule with the IP address,120.1.1.1. The load balancer is servingrequests from backends in theus-central1 region.

External passthrough Network Load Balancer example.
External passthrough Network Load Balancer example (click to enlarge).

For more information about external passthrough Network Load Balancers, see theExternal passthrough Network Load Balancer overview.For information about configuring external passthrough Network Load Balancers, see one of the following:

How Network Service Tiers affect load balancers

InNetwork Service Tiers, the distinction betweenStandard Tier and Premium Tier depends on how far traffic is routed over thepublic internet:

  • Standard Tier: Offloads traffic as close as possible to the data center.This means that traffic is typically routed over the public internet for alonger distance, compared with Premium Tier.

  • Premium Tier: Routes traffic through Google's production network as far aspossible before leaving Google Cloud to get to the end user.

Load balancerSupported Network Service Tiers
  • Global external Application Load Balancer
  • Global external proxy Network Load Balancer
These load balancers are always Premium Tier. Their backend services, forwarding rules, and IP addresses are global.
  • Classic Application Load Balancer
  • Classic proxy Network Load Balancer

These load balancers can be Premium Tier or Standard Tier.

With Premium Tier, they are global. Their forwarding rules, IP addresses, and backend services are global.

In Standard Tier, these load balancers are effectively regional. Their backend servicesare global, but their forwarding rules and IP addresses are regional.

  • Regional external Application Load Balancer
  • Regional external proxy Network Load Balancer
These load balancers can be Premium or Standard Tier. Their backend services, forwarding rules, and IP addresses are always regional.
  • Cross-region internal Application Load Balancer
  • Regional internal Application Load Balancer
  • Regional internal proxy Network Load Balancer
  • Cross-region internal proxy Network Load Balancer
  • Internal passthrough Network Load Balancer
These load balancers support traffic within a VPC network (including networks connected to it). Traffic is Premium Tier because it is within a VPC network.
External passthrough Network Load Balancer

These load balancers must use regional external IPv4 or IPv6 addresses.

These load balancers can be either Premium or Standard Tier. IPv6 addresses require Premium Tier.

Only thebackend service-based external passthrough Network Load Balancers can handle IPv6 traffic.

IP protocol specifications

Each forwarding rule has an associated IP protocol that the rule will serve.The default protocol value isTCP.

Note:
  • For external passthrough Network Load Balancers, theL3_DEFAULT forwarding rule protocol can be used to load balance TCP, UDP, ESP, GRE, ICMP, and ICMPv6 traffic.
  • For internal passthrough Network Load Balancer forwarding rules that use IPv4 or IPv6 addresses, theL3_DEFAULT forwarding rule protocol can be used to load balance the TCP, UDP, ICMP, ICMPv6, SCTP, ESP, AH, and GRE traffic.
ProductLoad balancing schemeIP protocol options
Global external Application Load BalancerEXTERNAL_MANAGEDTCP
Classic Application Load BalancerEXTERNALTCP
Regional external Application Load BalancerEXTERNAL_MANAGEDTCP
Cross-region internal Application Load BalancerINTERNAL_MANAGEDTCP
Regional internal Application Load BalancerINTERNAL_MANAGEDTCP
Global external proxy Network Load BalancerEXTERNAL_MANAGEDTCP or SSL
Classic proxy Network Load BalancerEXTERNALTCP or SSL
Regional external proxy Network Load BalancerEXTERNAL_MANAGEDTCP
Regional internal proxy Network Load BalancerINTERNAL_MANAGEDTCP
Cross-region internal proxy Network Load BalancerINTERNAL_MANAGEDTCP
External passthrough Network Load BalancerEXTERNALTCP, UDP, orL3_DEFAULT
Internal passthrough Network Load BalancerINTERNALTCP, UDP, or L3_DEFAULT
Cloud Service MeshINTERNAL_SELF_MANAGEDTCP

IP address specifications

The forwarding rule must have an IP address that your customers use to reachyour load balancer. The IP address can be static or ephemeral.

A static IP address provides a single reserved IP address that you canpoint your domain to. If you ever need to delete your forwarding rule and re-addit, you can continue using the same reserved IP address.

An ephemeral IP address remains constant while the forwarding rule exists.When you choose an ephemeral IP address, Google Cloud associates an IPaddress with your load balancer's forwarding rule. If you need to delete theforwarding rule and re-add it, the forwarding rule might receive a new IPaddress.

Depending on the load balancer type, the IP address can have variousattributes. The following table summarizes the valid IP address configurations,based on the load balancing scheme and the target of the forwarding rule.

Product and schemeTargetIP address typeIP address scopeIP address tierReservable IP addressNotes
Global external Application Load Balancer

EXTERNAL_MANAGED
Target HTTP proxy
Target HTTPS proxy
ExternalGlobalPremium Tier: Global external IP address and forwarding ruleYes, optionalIPv6 available
Classic Application Load Balancer

EXTERNAL*
Target HTTP proxy
Target HTTPS proxy
ExternalRegional or global, matching the forwarding rulePremium Tier: Global external IPv4 or IPv6 address and forwarding rule

Standard Tier: Regional external IPv4 address and forwarding rule
Yes, optionalIPv6 available with a global external address (Premium Tier)
Regional external Application Load Balancer

EXTERNAL_MANAGED
Target HTTP proxy
Target HTTPS proxy
ExternalRegionalPremium Tier or Standard TierYes, optionalIPv6 not available
Cross-region internal Application Load Balancer

INTERNAL_MANAGED
Target HTTP proxy
Target HTTPS proxy
InternalRegionalPremium TierYes, optionalGlobal forwarding rule is configured with a regional IP address within the primary IPv4 address range of the associated regional subnet. This is different from the global external Application Load Balancer where the global forwarding rule has a global anycast IP address.
Regional internal Application Load Balancer

INTERNAL_MANAGED
Target HTTP proxy
Target HTTPS proxy
InternalRegionalPremium TierYes, optionalForwarding rule address must be within the primary IPv4 address range of the associated subnet.
Global external proxy Network Load Balancer

EXTERNAL_MANAGED
Target SSL proxy
Target TCP proxy
ExternalGlobalPremium TierYes, optionalIPv6 available
Classic proxy Network Load Balancer

EXTERNAL
Target SSL proxy
Target TCP proxy
ExternalRegional or global, matching the forwarding rulePremium Tier: Global external IPv4 or IPv6 address and forwarding rule

Standard Tier: Regional external IPv4 address and forwarding rule
Yes, optionalIPv6 available with a global external address (Premium Tier)
Regional external proxy Network Load Balancer

EXTERNAL_MANAGED
Target TCP proxyExternalRegionalPremium Tier or Standard TierYes, optionalIPv6 not available
Regional internal proxy Network Load Balancer

INTERNAL_MANAGED
Target TCP proxyInternalRegionalPremium TierYes, optionalForwarding rule address must be within the primary IPv4 address range of the associated subnet
Cross-region internal proxy Network Load Balancer

INTERNAL_MANAGED
Target TCP proxyInternalRegionalPremium TierYes, optionalForwarding rule address must be within the primary IPv4 address range of the associated subnet
External passthrough Network Load Balancer

EXTERNAL
Backend service
Target pool
ExternalRegional Standard (IPv4 addresses)
Premium (IPv4 or IPv6 addresses)
Yes, optionalIPv6 support requires a backend service-based external passthrough Network Load Balancer. Forwarding rule IPv6 address must be within a subnet's external IPv6 address range. The external IPv6 address is sourced from the subnet's external IPv6 address range and is therefore in Premium Tier.
Internal passthrough Network Load Balancer

INTERNAL
Backend serviceInternalRegionalPremium TierYes, optional

For IPv4 traffic, the forwarding rule must reference an IPv4 address from the primary IPv4 subnet range.

For IPv6 traffic, the forwarding rule must reference a/96 range of internal IPv6 addresses from a dual-stack or single-stack (IPv6-only) subnet's/64 internal IPv6 address range.

Cloud Service Mesh

INTERNAL_SELF_MANAGED
Target HTTP proxy
Target gRPC proxy
InternalGlobalNot applicableNo0.0.0.0, 127.0.0.1, or any RFC 1918 address is allowed
Classic VPN

EXTERNAL
See theClassic VPN documentationExternalRegionalCloud VPN doesn't have Network Service TiersYes, requiredIPv6 not supported

Multiple forwarding rules with a common IP address

Two or more forwarding rules with theEXTERNAL orEXTERNAL_MANAGED loadbalancing scheme (or a combination of both) can share the same IP address if thefollowing are true:

  • The ports used by each forwarding rule don't overlap. This is becauseeach combination ofIP address + protocol + port must be unique.
  • The Network Service Tiers of each forwarding rule matches theNetwork Service Tiers of the external IP address.

Examples:

  • An external passthrough Network Load Balancer that accepts traffic on TCP port 79 and anotherexternal passthrough Network Load Balancer that accepts traffic on TCP port 80 can share the sameregional external IP address.
  • You can use the same global external IP address for an external Application Load Balancer(HTTP and HTTPS).

Two or more forwarding rules with theINTERNAL orINTERNAL_MANAGED loadbalancing scheme (or a combination of both) can share the same IP address if thefollowing is true:

  • The ports used by each forwarding rule don't overlap. This is becauseeach combination ofIP address + protocol + port must be unique.

For more information, see the following:

If the forwarding rule's load balancing scheme isINTERNAL_SELF_MANAGED forCloud Service Mesh, it must have a unique IP address.

Port specifications

The following table summarizes the valid port configurations, basedon the load balancing scheme and the target of the forwarding rule.

ProductLoad balancing schemeTargetPort requirements
Global external Application Load Balancer

Regional external Application Load Balancer
EXTERNAL_MANAGEDTarget HTTP proxy
Target HTTPS proxy
Can reference exactly one port from 1-65535
Classic Application Load BalancerEXTERNALTarget HTTP proxy
Target HTTPS proxy
Can reference exactly one port from 1-65535
Cross-region internal Application Load Balancer

Regional internal Application Load Balancer
INTERNAL_MANAGEDTarget HTTP proxy
Target HTTPS proxy
Can reference exactly one port from 1-65535
Global external proxy Network Load BalancerEXTERNAL_MANAGEDTarget TCP proxy
Target SSL proxy
Can reference exactly one port from 1-65535
Classic proxy Network Load BalancerEXTERNALTarget TCP proxy
Target SSL proxy
Can reference exactly one port from 1-65535
Regional external proxy Network Load BalancerEXTERNAL_MANAGEDTarget TCP proxyCan reference exactly one port from 1-65535
Regional internal proxy Network Load BalancerINTERNAL_MANAGEDTarget TCP proxyCan reference exactly one port from 1-65535
Cross-region internal proxy Network Load BalancerINTERNAL_MANAGEDTarget TCP proxyCan reference exactly one port from 1-65535
External passthrough Network Load BalancerEXTERNALBackend serviceIf the forwarding rule protocol isTCP orUDP, you can configure:
  • A list of up to five (contiguous or non-contiguous) ports, or,
  • A single port range (contiguous), or,
  • All ports. To configure all ports, either set--ports=ALL using thegcloud command line tool, or setallPorts toTrue using the API.

If the forwarding rule protocol isL3_DEFAULT, you must configure all ports.
  • To configure all ports, either set--ports=ALL using thegcloud command line tool, or setallPorts toTrue using the API.
Target pool

Must be a single port range (contiguous)

Specifying a port is optional for forwarding rules used with target pool-based external passthrough Network Load Balancers. If no port is specified, traffic from all ports (1-65535) is forwarded.

Internal passthrough Network Load BalancerINTERNALBackend serviceUp to five (contiguous or non-contiguous) ports or you can configure all ports using one of these methods:
set--ports=ALL using thegcloud command line tool, or
setallPorts toTrue using the API.
Cloud Service MeshINTERNAL_SELF_MANAGEDTarget HTTP proxy
Target HTTPS proxy
Must be a single value.

Within a VPC network, no two forwarding rules for Cloud Service Mesh can have the same IP address and port specification.
Classic VPNEXTERNALTarget VPN gatewayCan reference exactly one of the following ports: 500, 4500

IAM conditions

With Identity and Access Management (IAM) conditions, you can set conditionsto control which roles are granted to principals. This feature lets you grantpermissions to principals if configured conditions are met.

An IAM condition checks the load balancing scheme (for example,INTERNAL orEXTERNAL) in the forwarding rule and allows (or disallows)creation of the forwarding rule. If a principal tries to create a forwardingrule without permission, an error message appears.

For more information, seeIAMConditions.

Use forwarding rules

If you're using the Google Cloud console to set up a load balancer, theforwarding rule is set up implicitly as part of your frontend configuration. Ifyou're using the Google Cloud CLI or the API, you need to configure theforwarding rule explicitly.

After creating a forwarding rule, you can make limited changes to it. Forexample, after a forwarding rule is defined, you can't change its IP address,port number, or protocol. However, you can update certain settings forforwarding rules by editing the frontend configuration of the load balancer theyare associated with. Use either the gcloud CLI or the API to make any otherchanges.

Change the IP address of a forwarding rule

You cannot change the IP address of an existing forwarding rule.To update the IP address of a forwarding rule, you must deleteand recreate the rule as follows:

  1. Delete the forwarding rule using thegcloud compute forwarding-rules delete command or theforwardingRules.delete method.

  2. Recreate the forwarding rule using thegcloud compute forwarding-rules create command or theforwardingRules.insert method.

APIs

For descriptions of the properties and methods available to you when workingwith forwarding rules through the REST API, see the following:

Google Cloud CLI

For the gcloud CLI reference documentation, see the following:

gcloud compute forwarding-rules

  • Global:--global
  • Regional:--region=[REGION]

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.