I'm having a problem with configuring my postgresql server. I've installed PostgreSQL 9.0.2 on slackware 13.1x64 and it runs fine but I can't add a IP that could connect to PostgreSQL remotely.
The logs show me this:
LOG: invalid IP mask "trust": Name or service not known
CONTEXT: line 83 of configuration file "/usr/local/pgsql-9.0.2/data/pg_hba.conf"
FATAL: could not load pg_hba.conf
And on that line I have:
host all all **.**.***.* trust
The ** is my real IP address. But PostgreSQL tells me I need to set ip mask ? What's that I'm doing wrong ?
Thanks in advance,
Me
You need to specify an IP address of the form: 192.168.0.1/24 where "/24" is an alternative representation of your Subnet-Mask.
For a local area network you often see 255.255.255.0 as a Subnet-Mask. Each part of that Mask can be translated to an 8-Bit representation (255 = 11111111). So for 3 x 255 you've got 3x 8-Bit which leads to a total of 24-Bits and there you go. Of course, you'll find more detailed explanations on the internet.
Just use http://www.subnet-calculator.com/ or ask your provider for your Subnet-Mask.