pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
meaning of CIDR mask in pg_hba.conf
3+ messages / 3 participants
[nested] [flat]

* meaning of CIDR mask in pg_hba.conf
@ 2023-10-30 17:45 Atul Kumar <akumar14871@gmail.com>
  2023-10-30 17:49 ` Re: meaning of CIDR mask in pg_hba.conf Steve Pointer <spointer@humdai.net>
  2023-10-30 17:50 ` Re: meaning of CIDR mask in pg_hba.conf Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Atul Kumar @ 2023-10-30 17:45 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Hi,

I have postgres version 12 running on centos 7.

I found an entry in my pg_hba.conf entry as given below under IPV4
connections:

host   all   all  <remote_ip>/0  md5

I could not understand the meaning of "/0" here.

as I know that each IPV4 there are total 4 octets and each octet will be
read based on given CIDR mask (/8, /16, /24 or /32) but  I am watching
first time "/0" that I couldn't understand, So please help me in explaining
its prompt meaning and how IP will be read with /0?



Regards,
Atul

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

* Re: meaning of CIDR mask in pg_hba.conf
  2023-10-30 17:45 meaning of CIDR mask in pg_hba.conf Atul Kumar <akumar14871@gmail.com>
@ 2023-10-30 17:49 ` Steve Pointer <spointer@humdai.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Steve Pointer @ 2023-10-30 17:49 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

> So please help me in explaining its prompt meaning and how IP will be read with /0?

It means no subnet mask so it will match all IP addresses.

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

* Re: meaning of CIDR mask in pg_hba.conf
  2023-10-30 17:45 meaning of CIDR mask in pg_hba.conf Atul Kumar <akumar14871@gmail.com>
@ 2023-10-30 17:50 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2023-10-30 17:50 UTC (permalink / raw)
  To: Atul Kumar <akumar14871@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org>


On 10/30/23 10:45 AM, Atul Kumar wrote:
> Hi,
>
> I have postgres version 12 running on centos 7.
>
> I found an entry in my pg_hba.conf entry as given below under IPV4 
> connections:
>
> host   all   all  <remote_ip>/0  md5
>
> I could not understand the meaning of "/0" here.
>
> as I know that each IPV4 there are total 4 octets and each octet will 
> be read based on given CIDR mask (/8, /16, /24 or /32) but  I am 
> watching first time "/0" that I couldn't understand, So please help me 
> in explaining its prompt meaning and how IP will be read with /0?


 From here:


https://www.postgresql.org/docs/current/auth-pg-hba-conf.html


... |0.0.0.0/0| represents all IPv4 addresses, and |::0/0| represents 
all IPv6 addresses.


Is <remote_ip>/ one of the above?

>
>
>
> Regards,
> Atul

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


end of thread, other threads:[~2023-10-30 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-30 17:45 meaning of CIDR mask in pg_hba.conf Atul Kumar <akumar14871@gmail.com>
2023-10-30 17:49 ` Steve Pointer <spointer@humdai.net>
2023-10-30 17:50 ` Adrian Klaver <adrian.klaver@aklaver.com>

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