There are many configuration parameters that control how people can connect remotely and locally to the database. The complete list is documented at http://www.postgresql.org/docs/current/static/runtime-config-connection.html.
Database connections
Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.