PostgreSQL - How do I expose database to different IP/users?

I’m using PostgreSQL 8.1. It’s currently set up to accept connections for the users: dbuser and postgres on localhost ( How can I accept communication to certain databases or users over different IP addresses?

the ‘listen_addresses’ option in postgresql.conf determines which addresses the database server will respond to. It takes the form of a comma separated list. The following will listen on the localhost address and

listen_addresses = ', localhost'

The pg_hba.conf file defines which users can connect to which databases over which addresses. The following example will allow everyone to connect to any database over localhost, and postgres to connect to the sample database over

host    all         all          md5
host    sample      postgres       md5

Be sure to restart the service for changes to take effect.

The /32 and /24 is referring to the bits of the subnet mask. I get into that a bit in a post here. More about subnet masks.