meaning of CIDR mask in pg_hba.conf
meaning of CIDR mask in pg_hba.conf
От:
Atul Kumar <akumar14871@gmail.com>
Дата:
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
Re: meaning of CIDR mask in pg_hba.conf
От:
"Steve Pointer" <spointer@humdai.net>
Дата:
> 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.
Re: meaning of CIDR mask in pg_hba.conf
От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
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 md5I 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