My recently-built DB machine has 4 listening network sockets that are bound to non-local interfaces: tcp/22:sshd (so I get in), tcp/5432:postgresql (because it's DB server, huh), udp/123:ntpd (so clocks are in sync) and tcp/443:nginx (serves some static pages with performance data).
"Any system that allows unrestricted access to the PostgreSQL network port, such as users running PostgreSQL on a public cloud, is especially vulnerable. Users whose servers are only accessible on protected internal networks, or who have effective firewalling or other network access restrictions, are less vulnerable.
"This is a good general rule for database security: do not allow port access to the database server from untrusted networks unless it is absolutely necessary. This is as true, or more true, of other database systems as it is of PostgreSQL."
Does it?
My recently-built DB machine has 4 listening network sockets that are bound to non-local interfaces: tcp/22:sshd (so I get in), tcp/5432:postgresql (because it's DB server, huh), udp/123:ntpd (so clocks are in sync) and tcp/443:nginx (serves some static pages with performance data).
I don't see any place where firewalling's needed.