Google cloud platform 从单个Google计算引擎中删除默认防火墙规则

Google cloud platform 从单个Google计算引擎中删除默认防火墙规则,google-cloud-platform,google-compute-engine,firewall,Google Cloud Platform,Google Compute Engine,Firewall,定义 我想对特定主机禁用特定的默认允许ssh 出于某种原因,我在gcloud计算实例描述$VM中没有看到标签default allow ssh: tags: fingerprint: ioTF8nBLmIk= items: - allow-tcp-443 - allow-tcp-80 我检查了规则定义: gcloud compute firewall-rules describe default-allow-ssh allowed: - IPProtocol: tcp p

定义

我想对特定主机禁用特定的
默认允许ssh

出于某种原因,我在
gcloud计算实例描述$VM
中没有看到标签
default allow ssh

tags:
  fingerprint: ioTF8nBLmIk=
  items:
  - allow-tcp-443
  - allow-tcp-80
我检查了规则定义:

gcloud compute firewall-rules describe default-allow-ssh

allowed:
- IPProtocol: tcp
  ports:
  - '22'
description: Allow SSH from anywhere
direction: INGRESS
disabled: false
kind: compute#firewall
name: default-allow-ssh
network: https://www.googleapis.com/compute/v1/projects/.../global/networks/default
priority: 65534
selfLink: https://www.googleapis.com/compute/v1/projects/.../global/firewalls/default-allow-ssh
sourceRanges:
- 0.0.0.0/0
我在定义中没有看到
targetTags
sourceTags
。这是否意味着该规则应用于整个项目,并且不能针对每个主机禁用

我在定义中没有看到targetTags或sourceTags。这是不是意味着 规则已应用于整个项目,并且不能针对每个主机禁用

没错,你可以找到更多关于默认防火墙规则的信息

最好的做法是通过使用标记或源IP来降低此规则的权限,但是您也可以制定另一个规则,使用标记拒绝特定VM的ssh通信,可能只允许来自堡垒主机的ssh

我在定义中没有看到targetTags或sourceTags。这是不是意味着 规则已应用于整个项目,并且不能针对每个主机禁用

没错,你可以找到更多关于默认防火墙规则的信息

最好的做法是通过使用标记或源IP来降低此规则的权限,但是您也可以制定另一个规则,使用标记拒绝特定VM的ssh通信,可能只允许来自堡垒主机的ssh