限制哪些IP能连接postgre

打开C:\Program Files\PostgreSQL\9.4\data\pg_hba.conf

以下代表本机能连,172.16.73.xx都能连(/24就代表最后一位是0-255),如果是172.16.73.11/32那就是限制了172.16.73.11才能连(实际我设置/32是无效的),

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             172.16.73.0/24            trust
host    all             all             172.16.183.0/24            trust

以下代表任何电脑都能连接

host     all     all     0.0.0.0  0.0.0.0     trust

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host	 all	 all	 0.0.0.0  0.0.0.0	 trust

相关推荐

  1. 限制哪些IP连接postgre

    2023-12-29 10:26:02       56 阅读
  2. ip限制怎么办

    2023-12-29 10:26:02       61 阅读
  3. postgres

    2023-12-29 10:26:02       58 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-29 10:26:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-29 10:26:02       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-29 10:26:02       87 阅读
  4. Python语言-面向对象

    2023-12-29 10:26:02       96 阅读

热门阅读

  1. STL 之 vector 通俗理解

    2023-12-29 10:26:02       47 阅读
  2. 基于matlab的一维多节数组排序

    2023-12-29 10:26:02       48 阅读
  3. 用VSCode Remote-SSH做Docker环境中的开发

    2023-12-29 10:26:02       60 阅读
  4. centos 编译安装 icu

    2023-12-29 10:26:02       67 阅读
  5. SQL高级:递归查询

    2023-12-29 10:26:02       56 阅读
  6. HIVE笔记

    2023-12-29 10:26:02       55 阅读
  7. Nginx屏蔽垃圾邮件骚扰IP的方法

    2023-12-29 10:26:02       61 阅读