Advertisement
cnemelka

pg_hba.conf

May 8th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.20 KB | None | 0 0
  1. cnemelka@ln-admindb01:~$ sudo cat /etc/postgresql/10/main/pg_hba.conf
  2. # PostgreSQL Client Authentication Configuration File
  3. # ===================================================
  4. #
  5. # Refer to the "Client Authentication" section in the PostgreSQL
  6. # documentation for a complete description of this file. A short
  7. # synopsis follows.
  8. #
  9. # This file controls: which hosts are allowed to connect, how clients
  10. # are authenticated, which PostgreSQL user names they can use, which
  11. # databases they can access. Records take one of these forms:
  12. #
  13. # local DATABASE USER METHOD [OPTIONS]
  14. # host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
  15. # hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
  16. # hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
  17. #
  18. # (The uppercase items must be replaced by actual values.)
  19. #
  20. # The first field is the connection type: "local" is a Unix-domain
  21. # socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
  22. # "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
  23. # plain TCP/IP socket.
  24. #
  25. # DATABASE can be "replicator", "sameuser", "samerole", "replication", a
  26. # database name, or a comma-separated list thereof.
  27. #
  28. # USER can be "all", a user name, a group name prefixed with "+", or a
  29. # comma-separated list thereof. In both the DATABASE and USER fields
  30. # you can also write a file name prefixed with "@" to include names
  31. # from a separate file.
  32. #
  33. # CIDR-ADDRESS specifies the set of hosts the record matches. It is
  34. # made up of an IP address and a CIDR mask that is an integer (between
  35. # 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies the number
  36. # of significant bits in the mask. Alternatively, you can write an IP
  37. # address and netmask in separate columns to specify the set of hosts.
  38. # Instead of a CIDR-address, you can write "samehost" to match any of
  39. # the server's own IP addresses, or "samenet" to match any address in
  40. # any subnet that the server is directly connected to.
  41. #
  42. # METHOD can be "md5", "reject", "md5", "password", "gss", "sspi",
  43. # "krb5", "ident", "pam", "ldap", "radius" or "cert". Note that
  44. # "password" sends passwords in clear text; "md5" is preferred since
  45. # it sends encrypted passwords.
  46. #
  47. # OPTIONS are a set of options for the authentication in the format
  48. # NAME=VALUE. The available options depend on the different
  49. # authentication methods -- refer to the "Client Authentication"
  50. # section in the documentation for a list of which options are
  51. # available for which authentication methods.
  52. #
  53. # Database and user names containing spaces, commas, quotes and other
  54. # special characters must be quoted. Quoting one of the keywords
  55. # "replicator", "sameuser", "samerole" or "replication" makes the name lose
  56. # its special character, and just match a database or username with
  57. # that name.
  58. #
  59. # This file is read on server startup and when the postmaster receives
  60. # a SIGHUP signal. If you edit the file on a running system, you have
  61. # to SIGHUP the postmaster for the changes to take effect. You can
  62. # use "pg_ctl reload" to do that.
  63.  
  64. # Put your actual configuration here
  65. # ----------------------------------
  66. #
  67. # If you want to allow non-local connections, you need to add more
  68. # "host" records. In that case you will also need to make PostgreSQL
  69. # listen on a non-local interface via the listen_addresses
  70. # configuration parameter, or via the -i or -h command line switches.
  71.  
  72. # CAUTION: Configuring the system for local "md5" authentication
  73. # allows any local user to connect as any PostgreSQL user, including
  74. # the database superuser. If you do not md5 all your local users,
  75. # use another authentication method.
  76.  
  77. local all all trust
  78. #Unix domain socket connections only for Database Administrators
  79. local all +Administrators ldap ldapserver=ln-ad01.entrata.com ldapprefix="" ldapsuffix="@dc2.propsol.org"
  80.  
  81. #IPv4 local connections for Database Administrators
  82. host all +Administrators 127.0.0.1/32 ldap ldapserver=ln-ad01.entrata.com ldapprefix="" ldapsuffix="@dc2.propsol.org"
  83.  
  84. #Tunnel Server
  85. host all all 192.168.160.249/32 ldap ldapserver=ln-ad01.entrata.com ldapprefix="" ldapsuffix="@dc2.propsol.org"
  86. host all all 10.0.7.172/32 ldap ldapserver=ln-ad01.entrata.com ldapprefix="" ldapsuffix="@dc2.propsol.org"
  87.  
  88. #for Unix domain socket connections only
  89. local all all md5
  90.  
  91. #IPv4 local connections:
  92. host all all 127.0.0.1/32 md5
  93.  
  94. #IPv6 local connections:
  95. host all all ::1/128 md5
  96.  
  97. #PGQ server
  98. #Scrubbing DB server
  99. host all all 192.168.150.45/32 md5
  100.  
  101. #Application/Script servers
  102. host all all 192.168.160.0/23 md5
  103. host all all 192.168.150.0/24 md5
  104. host all all 192.168.99.0/24 md5
  105. host all all 192.168.111.0/24 md5
  106. host all all 192.168.55.0/24 md5
  107. host all all 10.1.1.0/24 md5
  108. host all all 10.6.0.0/16 md5
  109. host all all 10.17.0.0/16 md5
  110. host all all 10.1.50.0/24 md5
  111.  
  112. # Testing entries
  113. hostssl replication all 0.0.0.0/0 md5
  114. host replication all 0.0.0.0/0 md5
  115.  
  116. #DR Replication Server
  117. hostssl replication replicator 10.17.0.0/16 md5
  118. #hostssl replication ps_ro 10.0.0.0/8 md5
  119. #hostssl replication ps_ro 10.19.0.0/16 md5
  120. #hostssl replication ps_ro 10.19.165.0/24 md5
  121. #hostssl replication ps_ro 10.19.165.190/32 md5
  122. #host replication ps_ro 10.0.0.0/8 md5
  123. #host replication ps_ro 10.19.0.0/16 md5
  124. #host replication ps_ro 10.19.165.0/24 md5
  125. #host replication ps_ro 10.19.165.190/32 md5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement