bundle/wireguard: fix firewall for home.router

This commit is contained in:
Franzi 2023-12-10 16:57:19 +01:00
parent cd48cc5911
commit f3269ce979
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 4 additions and 1 deletions

View file

@ -226,7 +226,9 @@ def firewall(metadata):
except NoSuchNode: # roadwarrior
ports['{}/udp'.format(config['my_port'])] = atomic(set(metadata.get('wireguard/restrict-to', set())))
else:
ports['{}/udp'.format(config['my_port'])] = atomic({name})
ports['{}/udp'.format(config['my_port'])] = atomic(
set(repo.libs.s2s.WG_AUTOGEN_SETTINGS.get(name, {}).get('firewall', set())) | {name}
)
return {
'firewall': {

View file

@ -23,6 +23,7 @@ WG_AUTOGEN_NODES = [
WG_AUTOGEN_SETTINGS = {
# special settings to apply when peering with a specific node
'home.router': {
'firewall': {'versatel'},
'no_autoconnect': True,
'persistent_keepalive': False,
},