我注意到我的 gcloud 计算引擎上出现了一些奇怪的行为”这个默认防火墙规则没有效果:
> $ gcloud compute --project "plop" firewall-rules
> describe default-allow-http allowed:
> - IPProtocol: tcp ports:
> - '80' creationTimestamp: '2018-07-26T05:17:16.627-07:00' description: '' direction: INGRESS kind: compute#firewall name:
> default-allow-http network:
> https://www.googleapis.com/compute/v1/projects/plop/global/networks/default
> priority: 1000 selfLink:
> https://www.googleapis.com/compute/v1/projects/plop/global/firewalls/default-allow-http
> sourceRanges:
> - 0.0.0.0/0 targetTags:
> - http-server
我添加了这一点:
> $ gcloud compute --project "plop" firewall-rules
> describe web allowed:
> - IPProtocol: tcp ports:
> - '80' creationTimestamp: '2018-06-26T01:48:18.068-07:00' description: '' direction: INGRESS kind: compute#firewall name: web
> network:
> https://www.googleapis.com/compute/v1/projects/plop/global/networks/default
> priority: 1000 selfLink:
> https://www.googleapis.com/compute/v1/projects/plop/global/firewalls/web
> sourceRanges:
> - 0.0.0.0/0
>
在我看来这两条规则是相同的,知道为什么吗?