如何禁用 Gcloud 端口或为什么 google 云计算引擎过滤或打开了这么多端口?
How to disable Gcloud ports OR Why does google cloud compute engine have so many ports filtered or open?
使用 gcloud 计算引擎 运行 多个互连服务
- IPFS 节点(glcoud 计算引擎)
- Postgres 数据库 (gcloud SQL)
- Nginx + Docker 应用程序(gcloud 计算引擎)
在尝试转发和打开正确的服务互连端口时,我发现了一些问题。特别是在为非 web 或非 ssh 端口打开端口时,and/or 使用 NginX 监听非标准 web 端口(例如,用于将非标准端口上的 http 请求转发到 docker 容器)。
使用 Nmap,我发现超过 900 个端口处于 'filtered' 状态。我假设是因为 Google 云虚拟主机使用 bc.googleusercontent.com
作为主要主机。
这是一个示例:端口 8020 被过滤为 'intu-ec-svcdisc' 服务。我发现是这个服务 INTUIT service discoverer.
我希望找到一种方法来打开其中几个我需要的端口。
根据nmap
Filtered means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed. Closed ports have no application listening on them, though they could open up at any time.
默认情况下,GCP 仅允许端口 22/tcp 和 3389/tcp 传入流量到您的所有实例,但是您可以选择使用 http-server
and/or [=11 标记您的 GCE 资源=] 也允许端口 80/tcp 和 443/tcp。
您在 nmap 输出中看到的正是那些打开/关闭的端口,因为它们实际上可以到达您的 GCE 实例,但默认情况下 GCP 防火墙会阻止额外的传入流量,因此您将其视为“已过滤”。
您需要在 here by using the following guide or video 上打开所需的端口,请记住,您还可以在操作系统中启用防火墙,这可能会拒绝这些请求。
使用 gcloud 计算引擎 运行 多个互连服务
- IPFS 节点(glcoud 计算引擎)
- Postgres 数据库 (gcloud SQL)
- Nginx + Docker 应用程序(gcloud 计算引擎)
在尝试转发和打开正确的服务互连端口时,我发现了一些问题。特别是在为非 web 或非 ssh 端口打开端口时,and/or 使用 NginX 监听非标准 web 端口(例如,用于将非标准端口上的 http 请求转发到 docker 容器)。
使用 Nmap,我发现超过 900 个端口处于 'filtered' 状态。我假设是因为 Google 云虚拟主机使用 bc.googleusercontent.com
作为主要主机。
这是一个示例:端口 8020 被过滤为 'intu-ec-svcdisc' 服务。我发现是这个服务 INTUIT service discoverer.
我希望找到一种方法来打开其中几个我需要的端口。
根据nmap
Filtered means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed. Closed ports have no application listening on them, though they could open up at any time.
默认情况下,GCP 仅允许端口 22/tcp 和 3389/tcp 传入流量到您的所有实例,但是您可以选择使用 http-server
and/or [=11 标记您的 GCE 资源=] 也允许端口 80/tcp 和 443/tcp。
您在 nmap 输出中看到的正是那些打开/关闭的端口,因为它们实际上可以到达您的 GCE 实例,但默认情况下 GCP 防火墙会阻止额外的传入流量,因此您将其视为“已过滤”。
您需要在 here by using the following guide or video 上打开所需的端口,请记住,您还可以在操作系统中启用防火墙,这可能会拒绝这些请求。