There are similar questions but nothing worked for me. I have already added this line to my `pg_hba.conf`:

```
host all all all trust

```

And this one to my `postgresql.conf`:

```
listen_addresses = '*'

```

My networking settings in the Vagrantfile are:

```
config.vm.network "private_network", ip: "10.0.0.0"
config.vm.network :forwarded_port, guest: 3000, host: 3000, auto_correct: true

```

When I try to connect from the host, I get:

```
$ psql -h 10.0.0.0 -U <username> -d <database>
psql: could not connect to server: Permission denied
    Is the server running on host "10.0.0.0" and accepting
    TCP/IP connections on port 5432?

```

The same command from the guest works with no problems. What am I missing??

[UPDATE]

I changed the private network ip to "192.168.1.77" (got it from a working example) and it worked. Still don't know why 10.0.0.0 wasn't good though, since it is in the [reserved private address space](https://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces), so I'll leave the question unanswered.