GBase 8c
运维管理
文章

Linux 修改GBase 8c外部访问白名单

发表于2024-02-05 13:47:58238次浏览1个评论

1. 查找配置文件
# find / -name pg_hba.conf
# find / -name postgresql.conf
2.修改
2.1 修改pg_hba.conf
查找IPv4 local connections
  修改默认的
host all all 127.0.0.1/32 trust 为
host all all 192.168.1.1/32 md5 #IP全匹配

host all all 192.168.1.1/24 md5 #IP匹配前三段

host all all 0.0.0.0/0 md5 #全部允许
2.2 修改postgresql.conf

 查找 listen_addresses 、password_encryption_type
修改
password_encryption_type = 1
listen_addresses = '*'

重启数据库
3.1 创建新用户或修改已有用户密码生效远程连接。


如果还有异常,请查看防火墙或看看对端口 ip是否限制
或者修改当前用户口令

评论

登录后才可以发表评论
GBase用户51935发表于 2个月前
向大佬学习