[moinmoin] Fix subnets for ENS and Aurore
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
parent
f75c12fb63
commit
43a1b5bb58
|
@ -152,13 +152,13 @@ class Config(FarmConfig):
|
||||||
),
|
),
|
||||||
ip_range.IpRange(
|
ip_range.IpRange(
|
||||||
local_nets=[
|
local_nets=[
|
||||||
'185.230.76.0/22', # ENS
|
'185.230.76.0/22', # IPv4 Crans
|
||||||
'185.230.79.0/23', # test pour zamok
|
'172.16.0.0/16', # IPv4 local
|
||||||
'10.53.0.0/16',
|
'100.64.0.0/10', # IPv4 adherents
|
||||||
'10.54.0.0/16',
|
'2a0c:700::/32', # IPv6 Crans
|
||||||
'2a0c:700:0::/40',
|
'138.231.0.0/16', # IPv4 ENS
|
||||||
'45.66.108.0/22', # IPv4 Aurore
|
'45.66.108.0/22', # IPv4 Aurore
|
||||||
'2a09:6840::/29' # IPv6 Aurore
|
'2a09:6840::/32', # IPv6 Aurore
|
||||||
],
|
],
|
||||||
actions=['newaccount'],
|
actions=['newaccount'],
|
||||||
actions_msg={'newaccount':"La création de comptes n'est autorisée que depuis le réseau du Cr@ns ou sur zamok."},
|
actions_msg={'newaccount':"La création de comptes n'est autorisée que depuis le réseau du Cr@ns ou sur zamok."},
|
||||||
|
@ -172,7 +172,19 @@ class Config(FarmConfig):
|
||||||
|
|
||||||
def ip_autorised_create_account(self, ip):
|
def ip_autorised_create_account(self, ip):
|
||||||
{% if moinmoin.main %}
|
{% if moinmoin.main %}
|
||||||
return ip.startswith('185.230.76.') or ip.startswith('185.230.77.') or ip.startswith('185.230.78.') or ip.startswith('185.230.79.') or ip.startswith('10.') or ip.startswith('2a0c:700:0:')
|
return ip.startswith('185.230.76.') \
|
||||||
|
or ip.startswith('185.230.77.') \
|
||||||
|
or ip.startswith('185.230.78.') \
|
||||||
|
or ip.startswith('185.230.79.') \
|
||||||
|
or ip.startswith('172.16.') \
|
||||||
|
or ip.startswith('100.64.') \
|
||||||
|
or ip.startwith('138.231.') \
|
||||||
|
or ip.startwith('45.66.108.') \
|
||||||
|
or ip.startwith('45.66.109.') \
|
||||||
|
or ip.startwith('45.66.110.') \
|
||||||
|
or ip.startwith('45.66.111.') \
|
||||||
|
or ip.startswith('2a0c:700:') \
|
||||||
|
or ip.startswith('2a09:6840:')
|
||||||
{% else %}
|
{% else %}
|
||||||
return False
|
return False
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue