Thread: FW: Allowing user to connect to a database?
Hi Paul, This worked very well. Perhaps, you can help me with another question: If I write an aaa bbb ccc of 200.200.200.0, do all clientes with IP addresses between 0.0.0.0 and 200.200.200.0 can connect? Thanks in advance for your response -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Paul Thomas Sent: Wednesday, June 18, 2003 4:19 PM To: pgsql-general @ postgresql . org Subject: Re: [GENERAL] Allowing user to connect to a database? On 18/06/2003 19:38 Carlos wrote: > Hi Forum, > What line should I enter in pg_hba.conf in order to allow all users > with subnet-mask starting at 255.255.255.0 into database "test"? > Should it > be: > Host test all 0.0.0.0 255.255.255.0 trust > I think you would need something like Host test all aaa.bbb.ccc.0 255.255.255.0 trust where aaa is between 1 and 254 and bbb and ccc are between 0 and 254 (for example 10.0.7.0 or 192.168.3.0) HTH -- Paul Thomas +------------------------------+---------------------------------------- -----+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------- -----+ ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
On 19/06/2003 14:04 Carlos Oliva wrote: > Hi Paul, > This worked very well. Perhaps, you can help me with another question: > If I write an aaa bbb ccc of 200.200.200.0, do all clientes with IP > addresses between 0.0.0.0 and 200.200.200.0 can connect? > No. The client ips would have to be in the range 200.200.200.1 to 200.200.200.254. The rules for sub-nets and sub-net masks can be a bit confusing and I've yet to find a tutorial on-line which is easy to follow. It might help you to think of 200.200.200.0 as 200.200.200.*. HTH -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+
Thanks again for your help. I think that the picture is getting clearer in my mind. -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Paul Thomas Sent: Thursday, June 19, 2003 10:37 AM To: pgsql-general @ postgresql . org Subject: Re: FW: [GENERAL] Allowing user to connect to a database? On 19/06/2003 14:04 Carlos Oliva wrote: > Hi Paul, > This worked very well. Perhaps, you can help me with another > question: If I write an aaa bbb ccc of 200.200.200.0, do all clientes > with IP addresses between 0.0.0.0 and 200.200.200.0 can connect? > No. The client ips would have to be in the range 200.200.200.1 to 200.200.200.254. The rules for sub-nets and sub-net masks can be a bit confusing and I've yet to find a tutorial on-line which is easy to follow. It might help you to think of 200.200.200.0 as 200.200.200.*. HTH -- Paul Thomas +------------------------------+---------------------------------------- -----+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------- -----+ ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings