• 修改配置文件 pg_hba.conf
  • 将 host all all 0.0.0.0/0 md5这行去除
  • 然后在下面添加限制规则 ,形如下图最后两行
  • PG限制指定IP访问_数据库

  • 重启数据库服务