google-cloud-platform - GCP 防火墙规则是单向应用还是双向应用?

标签 google-cloud-platform firewall

我读了这个Google's documentation 。这部分让我很困惑。

Each firewall rule applies to incoming (ingress) or outgoing (egress) connection, not both.

接下来的段落

VPC firewall rules are stateful.

When a connection is allowed through the firewall in either direction, return traffic matching this connection is also allowed. You cannot configure a firewall rule to deny associated response traffic.

根据上述内容,我认为连接和流量方向不是指同一件事,对吗?

在 GCP 中,默认为入口方向。如果我们不指定方向,则应用于实例的防火墙规则将仅应用于入口方向。那么,当返回流量仅在一个方向应用时,如何匹配防火墙规则呢?

最佳答案

在现代防火墙中,您只需定义哪个部分可以启动连接。当连接被授权通过防火墙时,响应也被授权。防火墙规则的返回方式是隐式的。

通常,默认情况下,在 GCP 上,您的所有虚拟机都可以启动传出连接(允许所有出站流量),但所有外部 IP 无法启动与您的虚拟机的连接(拒绝所有入口流量)

关于google-cloud-platform - GCP 防火墙规则是单向应用还是双向应用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67242420/

相关文章:

google-cloud-platform - 从 BigQuery 中的最新时间戳分表查询的特殊字符

linux - Linux 内核 3.4.103 上的 iptables --to-port

azure - 无法通过 VPN 从本地专用 IP 网络访问 Azure Key Vault。 IP私有(private)地址范围被禁止

基于 Java Web 的防火墙身份验证

linux - 将 Web 服务器从端口 5000 重定向到本地主机上的端口 80 (Fedora)

apache-spark - 无法将 spark 数据帧写入 gcs 存储桶

google-app-engine - 无法在 Google Cloud 上创建实例 - "zone..."没有足够的资源

google-cloud-platform - 使用 Colaboratory 永久允许 Google Cloud SDK 访问您的 Google 帐户

amazon-web-services - 创建后保留静态IP,限时使用

http - 端口 80/443 上的 SignalR