With this steps you can configure PostgreSQL to accept connections from the LAN on Port 5432.
-
edit /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*' - edit /var/lib/pgsql/data/pg_hba.conf add the network you want to allow like: host all all 192.168.190.0/24 md5
The file looks then like:# "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.190.0/24 md5 # IPv6 local connections: host all all ::1/128 md5
- reload postgresql
systemctl restart postgresql.service - check connection with pgAdmin or an other tool