PostgreSQL Netzwerkkonfiguration (pg hbaconf) » Historie » Revision 31
Revision 30 ([X] Daniel S, 02.12.2025 20:00) → Revision 31/33 ([E] Rocco Kreutz, 16.12.2025 12:51)
h1. PostgreSQL Netzwerkkonfiguration (pg_hba.conf) * 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 # SYS.ProdatAddOns-Connect hat keine Rechte auf den DBs, aber als Mitglieder die wirklichen DB-Benutzer (z.B. sys_postgrest_auth) der Prodat AddOns hostssl host all postgres,+SYS.ProdatAddOns-Connect 127.0.0.1/32 trust hostnossl all postgres,+SYS.ProdatAddOns-Connect 127.0.0.1/32 trust hostssl host all postgres,+SYS.ProdatAddOns-Connect ::1/128 trust hostnossl #host all postgres,+SYS.ProdatAddOns-Connect ::1/128 trust #hostssl all APPS,SYS.dblink,syncro all md5 #hostnossl all APPS,SYS.dblink,syncro all md5 hostssl host all APPS,SYS.dblink,syncro 127.0.0.1/32 md5 hostnossl all APPS,SYS.dblink,syncro 127.0.0.1/32 md5 hostssl host all APPS,SYS.dblink,syncro ::1/128 md5 hostnossl all APPS,SYS.dblink,syncro ::1/128 md5 # local loopback: von lokaler IP mit LoopBack außen (locale IP) # hostssl host all postgres,+SYS.ProdatAddOns-Connect x.x.X.X/32 trust # hostnossl all postgres,+SYS.ProdatAddOns-Connect x.x.X.X/32 trust # hostssl host all APPS,SYS.dblink,syncro 192.168.X.X/32 md5 # hostnossl all APPS,SYS.dblink,syncro 192.168.X.X/32 md5 # zB Grafana und sonstiges von localhost #hostssl #host all all 127.0.0.1/32 md5 #hostnossl all all 127.0.0.1/32 md5 #hostssl #host all all ::1/128 md5 #hostnossl all all ::1/128 md5 # IPv4 local & remote connections: # lokal auf dem Server = immer trust #hostssl #host all all 127.0.0.1/32 trust #hostnossl #host all all 127.0.0.1/32 trust #hostssl all all ::1/128 trust #hostnossl 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 hostssl all root,postgres,SYS.dblink,APPS 0.0.0.0/0 reject # Standard-Super-User restrict by default from outside hostnossl all root,postgres,SYS.dblink,APPS 0.0.0.0/0 reject # Standard-Super-User restrict by default from outside # Netzwerk Netzwerkfilter für Zugriffe der Clients!!!!!!!!!! #hostssl #host all all 192.168.X.X/16 md5 # nur auf das Subnetz eingeschänkt! #hostnossl all all 192.168.X.X/16 md5 # nur auf das Subnetz eingeschänkt! #### hostssl all all all md5 # Von überall aus zugänglich via md5 #### hostnossl host all all all md5 # Von überall aus zugänglich via md5 </pre>