This actually looks pretty reasonable, I am going to look into it. First I need to figure out how to open up the server for connections but still limit it, though.
Look at the pg_hba.conf file (probably something like /etc/postgresql/<version>/main/pg_hba.conf).