m1 nginx 公网暴露 443

数据库服务器 m1 上 nginx 监听 0.0.0.0:443,公网可直接访问 Frappe 页面。m1 只应暴露 MariaDB (3306,内网) + SSH (22)。


1. 归属

问题答案
属于哪个仓库?不涉及源码。VPS 上的 nginx 配置 + DO 防火墙
在容器内路径?m1 宿主机 nginx
在构建链的哪一步?Ansible playbook Setup Database Server 时自动安装了 nginx

2. 功能解释

m1 上为什么有 nginx?

Ansible playbook 对 Database Server 类型执行 setup 时,自动装了 nginx。但 m1 只是数据库,不需要 Web 服务。


3. 为什么会出现这个问题

Ansible playbook 把所有 Server 类型都装了 nginx。Database Server 本不需要。


4. 补丁/修改做了什么

未修复。issues.md 记录了这个已知问题,一直没动。


5. 性质判断

安全漏洞。公网可以访问数据库服务器的 Web 端口。


6. 正确做法

SolarFlow m-B:DO 控制台防火墙直接关 443/80 入站,只留 22 + 3306(内网)。或者在 Ansible 层面 Database Server 不装 nginx。


7. 影响范围

  • 公网可访问 Frappe 登录页
  • 潜在信息泄露(nginx 版本、Frappe 版本)