4.4.5 PostgreSQL network configuration

By default, access to the PostgreSQL database engine is restricted to the local system (the system where the database is installed) and no remote access via network is possible. If the sat-nms MNC system is a all-in-one installation this default configuration is sufficient and you can skip this chapter.

For a distributed MNC installation network access from a different host must be possible. Usually the database runs on the central server and the connected MNC servers needs to access the database via network.

example from pg_hba.conf

# allow access for two additional networks
host    all             all             172.17.1.0/16           md5
host    all             all             192.168.1.0/24          md5

example from postgresql.conf

# - Connection Settings -
listen_addresses = '*'   # what IP address(es) to listen on;
port = 5432              # (change requires restart)

You can test the network configuration with from any other system with an installed psql tool, or even on the local system if you specify the IP address of your PostgreSQL server:

example output

satnms@satnms7-dev:/etc/postgresql/15/main$ psql --host 192.168.2.231
Password for user satnms:
psql (15.10 (Debian 15.10-0+deb12u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.
satnms=>