From 2405ddf88798dab6674a963e462b1ba743994061 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernhard=20F=C3=BCrst?= Date: Fri, 6 Aug 2021 06:33:20 +0200 Subject: [PATCH] Allow all to connect in with md5 auth using IPv6 (#551) --- templates/postgres.10.template.yml | 6 ++++++ templates/postgres.12.template.yml | 6 ++++++ templates/postgres.13.template.yml | 6 ++++++ templates/postgres.9.5.template.yml | 6 ++++++ templates/postgres.template.yml | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/templates/postgres.10.template.yml b/templates/postgres.10.template.yml index 611f0bb..2c729bd 100644 --- a/templates/postgres.10.template.yml +++ b/templates/postgres.10.template.yml @@ -118,6 +118,12 @@ run: from: /^host.*all.*all.*127.*$/ to: "host all all 0.0.0.0/0 md5" + # allow all to connect in with md5 auth (IPv6) + - replace: + filename: "/etc/postgresql/13/main/pg_hba.conf" + from: /^host.*all.*all.*::1\/128.*$/ + to: "host all all ::/0 md5" + - exec: background: true # use fast shutdown for pg diff --git a/templates/postgres.12.template.yml b/templates/postgres.12.template.yml index 1db6c14..4bd8461 100644 --- a/templates/postgres.12.template.yml +++ b/templates/postgres.12.template.yml @@ -117,6 +117,12 @@ run: from: /^host.*all.*all.*127.*$/ to: "host all all 0.0.0.0/0 md5" + # allow all to connect in with md5 auth (IPv6) + - replace: + filename: "/etc/postgresql/13/main/pg_hba.conf" + from: /^host.*all.*all.*::1\/128.*$/ + to: "host all all ::/0 md5" + - exec: background: true # use fast shutdown for pg diff --git a/templates/postgres.13.template.yml b/templates/postgres.13.template.yml index f7e7899..48d5409 100644 --- a/templates/postgres.13.template.yml +++ b/templates/postgres.13.template.yml @@ -192,6 +192,12 @@ run: from: /^host.*all.*all.*137.*$/ to: "host all all 0.0.0.0/0 md5" + # allow all to connect in with md5 auth (IPv6) + - replace: + filename: "/etc/postgresql/13/main/pg_hba.conf" + from: /^host.*all.*all.*::1\/128.*$/ + to: "host all all ::/0 md5" + - exec: background: true # use fast shutdown for pg diff --git a/templates/postgres.9.5.template.yml b/templates/postgres.9.5.template.yml index febcc2f..7518430 100644 --- a/templates/postgres.9.5.template.yml +++ b/templates/postgres.9.5.template.yml @@ -118,6 +118,12 @@ run: from: /^host.*all.*all.*127.*$/ to: "host all all 0.0.0.0/0 md5" + # allow all to connect in with md5 auth (IPv6) + - replace: + filename: "/etc/postgresql/13/main/pg_hba.conf" + from: /^host.*all.*all.*::1\/128.*$/ + to: "host all all ::/0 md5" + - exec: background: true # use fast shutdown for pg diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 814fa15..478f064 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -192,6 +192,12 @@ run: from: /^host.*all.*all.*127.*$/ to: "host all all 0.0.0.0/0 md5" + # allow all to connect in with md5 auth (IPv6) + - replace: + filename: "/etc/postgresql/13/main/pg_hba.conf" + from: /^host.*all.*all.*::1\/128.*$/ + to: "host all all ::/0 md5" + - exec: background: true # use fast shutdown for pg -- 2.25.1