PostgreSQL Netzwerkkonfiguration (pg hbaconf) » Historie » Revision 23
Revision 22 ([E] Axel S, 12.09.2025 13:53) → Revision 23/27 ([E] Axel S, 16.09.2025 12:06)
h1. PostgreSQL Netzwerkkonfiguration (pg_hba.conf) (pg hbaconf) * APPS/Sys.dblink/syncro IMMER passwort, da sonst kein dblink funktinoiert. * postgres lokal trust wegen scripten und konsole. * SQL-Abfrage der aktuellen pg_hba.conf: <code class="sql">SELECT * FROM pg_hba_file_rules ORDER BY rule_number;</code> "pg_hba_file_rules":https://www.postgresql.org/docs/current/view-pg-hba-file-rules.html <pre> # aktuelle Vorlage im Wiki: https://redmine.prodat-sql.de/projects/prodat-v12-public/wiki/PostgreSQL_Netzwerkkonfiguration_(pg_hbaconf) # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only #local all all scram-sha-256 # PRODAT local & loopback host all postgres,sys_postgrest_auth 127.0.0.1/32 trust host all postgres,sys_postgrest_auth ::1/128 trust #host all APPS,SYS.dblink,syncro all md5 host all APPS,SYS.dblink,syncro 127.0.0.1/32 md5 host all APPS,SYS.dblink,syncro ::1/128 md5 # zB Grafana und sonstiges von localhost host all all 127.0.0.1/32 md5 host all all ::1/128 md5 # IPv4 local & remote connections: # lokal auf dem Server = immer trust # host all all 127.0.0.1/32 trust # host all all ::1/128 trust # Zugriffe von außen: host all root,postgres,SYS.dblink,APPS 0.0.0.0/0 reject # Standard-Super-User restrict by default from outside # Netzwerk # host all all 192.168.0.0/16 md5 # nur auf das Subnetz eingeschänkt! #### host all all all md5 # Von überall aus zugänglich via md5 </pre>