The following is a series of examples that can be used within the pg_hba.conf . The first allows a single IP to connect to all databases, without the use of a password.

Example 6-10. Single host entry.

        host    all    trust

This example will reject all users from host

Example 6-11. Example of a rejection entry

        host    all    reject

This example will allow any user, with the IP of and a valid password to connect to the database template1. The password will be encrypted during authentication.

Example 6-12. Single host, single database entry.

        host     template1     crypt

This example allows a small subnet of computers to access the booktown database.

Example 6-13. Small network connection entry

	host    booktown   trust