Config Files · 1 file
Sample pg_hba.conf File
pg_hba.conf controls PostgreSQL client authentication. Our sample is realistic and valid for its tool, with fake hosts and secrets.
pg_hba.conf · 649 B
PostgreSQL pg_hba.conf
PostgreSQL client-authentication rules: peer for local sockets, scram-sha-256 for the app subnet, TLS-only remote access and a replication line. All hosts, keys and secrets are fake.
CC0 · free for any use · Verified by an independent tool · Report a problem
# Sample pg_hba.conf — samplefiles.com
# TYPE DATABASE USER ADDRESS METHOD
local all postgres peer
local all all scram-sha-256
host all all 127.0.0.1/32 scram-sha-256
host all all ::1/128 scram-sha-256
host app app 10.0.1.0/24 scram-sha-256
hostssl all all 0.0.0.0/0 scram-sha-256
host replication replicator 10.0.2.10/32 scram-sha-256File details
Download from the command line
curl -L -o pg_hba.conf https://files.samplefiles.com/config/pg-hba-conf/pg_hba.confwget https://files.samplefiles.com/config/pg-hba-conf/pg_hba.confhttps://files.samplefiles.com/config/pg-hba-conf/pg_hba.confprintf '%s %s\n' 3147439a278b4dba95d48e2061c433aaa1d6376123e0b6aee352ff307c934e3d pg_hba.conf | shasum -a 256 -cOr check the download in your browser with the checksum calculator.