pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_hba.conf includes
3+ messages / 2 participants
[nested] [flat]

* pg_hba.conf includes
@ 2006-08-07 13:21  Adam Fernie <adam@mysi.co.uk>
  0 siblings, 1 reply; 3+ messages in thread

From: Adam Fernie @ 2006-08-07 13:21 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I'm trying to use an include file to add a list of host addresses to the
pg_hba.conf file.

The line in pg_hba.conf looks like...

host    dbname      all     @myhosts 255.255.255.255 md5

If I put a single ip or hostname in the file it works a treat but I
don't know how to include more than 1 host or IP address is the file.
Should it be comma seperated, newline for each file or something
different?

I'm using postgres 7.4 on debian.

Cheers

Adam




Scanned by Serendipity Interactive -  MYmailSAFE




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_hba.conf includes
@ 2006-08-07 13:57  Richard Broersma Jr <rabroersma@yahoo.com>
  parent: Adam Fernie <adam@mysi.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Richard Broersma Jr @ 2006-08-07 13:57 UTC (permalink / raw)
  To: Adam Fernie <adam@mysi.co.uk>; pgsql-admin

> host    dbname      all     @myhosts 255.255.255.255 md5
> 
> If I put a single ip or hostname in the file it works a treat but I
> don't know how to include more than 1 host or IP address is the file.
> Should it be comma seperated, newline for each file or something
> different?

You can add additional lines for each IP. 

Or if all of your clients are on the same sub-network, then you can alter your net mask in the
above line to allow them. i.e. <255.255.255.0>  So for example if your client is 191.168.1.100 and
your next mask is 255.255.255.0, then all ip like 192.168.1.* will be allowed to connect.

Regards,

Richard Broersma Jr.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_hba.conf includes
@ 2006-08-09 13:32  Adam Fernie <adam@mysi.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Adam Fernie @ 2006-08-09 13:32 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I understand how the subnetting works.  What I had problems with was
putting more than one IP address / hostname into the include file.

If my include file looks like so...
<file start>
1.2.3.4
<file end>
Then it works fine

If the include file looks like this...
<file start>
1.2.3.4
1.2.3.5
<file end>
Then it doesn't work (for either address) and I get an error like...
psql: FATAL:  missing or erroneous pg_hba.conf file

Hope someone can help here...


Adam

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Richard Broersma
Jr
Sent: 07 August 2006 14:58
To: Adam Fernie; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_hba.conf includes

> host    dbname      all     @myhosts 255.255.255.255 md5
> 
> If I put a single ip or hostname in the file it works a treat but I 
> don't know how to include more than 1 host or IP address is the file.
> Should it be comma seperated, newline for each file or something 
> different?

You can add additional lines for each IP. 

Or if all of your clients are on the same sub-network, then you can
alter your net mask in the above line to allow them. i.e.
<255.255.255.0>  So for example if your client is 191.168.1.100 and your
next mask is 255.255.255.0, then all ip like 192.168.1.* will be allowed
to connect.

Regards,

Richard Broersma Jr.



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq



Scanned by Serendipity Interactive -  MYmailSAFE






Scanned by Serendipity Interactive -  MYmailSAFE




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-08-09 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 13:21 pg_hba.conf includes Adam Fernie <adam@mysi.co.uk>
2006-08-07 13:57 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-08-09 13:32 Re: pg_hba.conf includes Adam Fernie <adam@mysi.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox