コンテンツにスキップ

イーグレスポリシー

ユーザーがCloudflare Gatewayを通じてインターネットに接続する際、デフォルトではそのトラフィックにはすべてのCloudflare WARPユーザーで共有されるソースIPアドレスが割り当てられます。エンタープライズユーザーは、専用イーグレスIPを購入することで、組織からのイーグレストラフィックにユニークで静的なIPを割り当てることができます。これらのソースIPはあなたのアカウントに専用であり、上流サービスのホワイトリスト内で使用できます。

イーグレスポリシーを使用すると、アイデンティティ、IPアドレス、地理的位置などの属性に基づいて、どの専用イーグレスIPがいつ使用されるかを制御できます。イーグレスポリシーに一致しないトラフィックは、最もパフォーマンスの高い専用イーグレスIPを使用することになります。

IPバージョンの強制

イーグレスにIPv4またはIPv6のどちらのみを使用するかを制御するには、DNSトラフィックをフィルタリングしていることを確認し、次にAAAAまたはAレコードをブロックするDNSポリシーを作成します。

例のポリシー

以下のイーグレスポリシーは、サードパーティネットワーク向けのすべてのトラフィックが静的ソースIPを使用するように構成されています:

Policy nameSelectorOperatorValueEgress method
Access third-party providerDestination IPis198.51.100.158Dedicated Cloudflare egress IPs
Primary IPv4 addressIPv6 address
203.0.113.882001:db8::/32

キャッチオールポリシー

最良のパフォーマンスを得るために、すべての他のユーザーをデフォルトのゼロトラストIP範囲を通じてルーティングするキャッチオールポリシーを作成することをお勧めします:

ポリシー名セレクター演算子イーグレスメソッド
デフォルトイーグレスポリシープロトコルinすべてのオプション (プロトコル)Cloudflareデフォルトイーグレスメソッド

GatewayポリシーはUI内で上から下へ評価されるため、キャッチオールポリシーをリストの一番下に配置してください。キャッチオールポリシーを含めない場合、他のすべてのトラフィックは最も近い専用イーグレスIPの場所を使用します。

イーグレスメソッド

イーグレスポリシーのために以下のオプションのいずれかを選択してください:

  • デフォルトCloudflareイーグレス: すべてのゼロトラストアカウントで共有されるデフォルトのソースIP範囲を使用します。ユーザートラフィックが最寄りのCloudflareデータセンターからイーグレスするため、最もパフォーマンスの高いインターネット体験を保証します。

  • 専用CloudflareイーグレスIP: ドロップダウンメニューで選択された主要なIPv4アドレスとIPv6範囲を使用します。異なるデータセンターにセカンダリIPv4アドレスを指定することもできます。主要なデータセンターがダウンした場合、Gatewayはセカンダリデータセンターからイーグレスしてトラフィックの落ち込みを回避します。IPv6トラフィックは任意のCloudflareデータセンターからイーグレスできるため、セカンダリIPv6は必要ありません。IPv4およびIPv6のイーグレス動作について詳しくは、イーグレスの場所を参照してください。

セレクター

Gatewayは以下のセレクターまたは基準に対してイーグレストラフィックを一致させます:

宛先大陸

The continent where the request is destined. Geolocation is determined from the target IP address. To specify a continent, enter its two-letter code into the Value field:

  • AF – Africa
  • AN – Antarctica
  • AS – Asia
  • EU – Europe
  • NA – North America
  • OC – Oceania
  • SA – South America
  • T1 – Tor network
UI nameAPI example
Destination Continent IP Geolocationnet.dst.geo.continent == “EU”

宛先国

The country that the request is destined for. Geolocation is determined from the target IP address. To specify a country, enter its ISO 3166-1 Alpha 2 code in the Value field.

UI nameAPI example
Destination Country IP Geolocationnet.dst.geo.country == “RU”

宛先IP

The IP address of the request’s target.

UI nameAPI example
Destination IPnet.dst.ip == "10.0.0.0/8"

宛先ポート

The port number of the request’s target.

UI nameAPI example
Destination Portnet.dst.port == "2222"

デバイスポスチャー

With the Device Posture selector, admins can use signals from end-user devices to secure access to their internal and external resources. For example, a security admin can choose to limit all access to internal applications based on whether specific software is installed on a device and/or if the device or software are configured in a particular way.

For more information on device posture checks, refer to Device posture.

UI nameAPI example
Passed Device Posture Checksany(device_posture.checks.failed[*] in {"1308749e-fcfb-4ebc-b051-fe022b632644"}), any(device_posture.checks.passed[*] in {"1308749e-fcfb-4ebc-b051-fe022b632644"})"

プロトコル

The protocol used to send the packet.

UI nameAPI example
Protocolnet.protocol == "tcp"

プロキシエンドポイント

The proxy server where your browser forwards HTTP traffic.

UI nameAPI example
Proxy Endpointproxy.endpoint == "3ele0ss56t.proxy.cloudflare-gateway.com"

ソース大陸

リクエストを行っているユーザーの大陸。

Geolocation is determined from the device’s public IP address (typically assigned by the user’s ISP). To specify a continent, enter its two-letter code into the Value field:

ContinentCode
AfricaAF
AntarcticaAN
AsiaAS
EuropeEU
North AmericaNA
OceaniaOC
South AmericaSA
Tor networkT1
UI nameAPI exampleEvaluation phase
Source Continent IP Geolocationnet.src.geo.continent == “North America”Before DNS resolution

ソース国

リクエストを行っているユーザーの国。

Geolocation is determined from the device’s public IP address (typically assigned by the user’s ISP). To specify a country, enter its ISO 3166-1 Alpha-2 code in the Value field.

UI nameAPI exampleEvaluation phase
Source Country IP Geolocationnet.src.geo.country == “RU”Before DNS resolution

ソース内部IP

Use this selector to apply egress policies to a private IP address, assigned by a user’s local network, that requests arrive to Gateway from. This selector will only apply to users connected through a Magic GRE or IPSec tunnel.

UI nameAPI example
Source Internal IPnet.src.internal_src_ip == “192.168.86.0/27”

ソースIP

UI nameAPI example
Source IPnet.src.ip == "10.0.0.0/8"

ソースポート

UI nameAPI example
Source Portnet.src.port == "2222"

ユーザー

Identity-based selectors include:

  • SAML Attributes
  • User Email
  • User Group Emails
  • User Group IDs
  • User Group Names
  • User Name

To use identity-based selectors, enable Gateway with WARP in the Zero Trust WARP client and enroll your user in your organization. For more information, refer to Identity-based policies.

仮想ネットワーク

Use this selector to match all traffic routed through a specific Tunnel Virtual Network via the WARP client.

UI nameAPI example
Virtual Networknet.vnet_id == “957fc748-591a-e96s-a15d-1j90204a7923”

比較演算子

Comparison operators are the way Gateway matches traffic to a selector. When you choose a Selector in the dashboard policy builder, the Operator dropdown menu will display the available options for that selector.

OperatorMeaning
isequals the defined value
is notdoes not equal the defined value
inmatches at least one of the defined values
not indoes not match any of the defined values
in listin a pre-defined list of values
not in listnot in a pre-defined list of values
matches regexregex evaluates to true
does not match regexregex evaluates to false
greater thanexceeds the defined number
greater than or equal toexceeds or equals the defined number
less thanbelow the defined number
less than or equal tobelow or equals the defined number

単一の値を入力するか、正規表現を使用して値の範囲を指定できます。

GatewayはRustを使用して正規表現を評価します。Rustの実装は、他の場所で使用される正規表現ライブラリとは若干異なります。正規表現が一致するかどうかを評価するには、Rustexpを使用できます。

論理演算子

To evaluate multiple conditions in an expression, select the And logical operator. These expressions can be compared further with the Or logical operator.

OperatorMeaning
Andmatch all of the conditions in the expression
Ormatch any of the conditions in the expression

The Or operator will only work with conditions in the same expression group. For example, you cannot compare conditions in Traffic with conditions in **アイデンティティ** または **デバイスポスチャー**.