2021-03-21 09:37:28 +00:00
|
|
|
from bundlewrap.metadata import atomic
|
|
|
|
|
2020-11-14 13:35:54 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
|
|
|
'openssh-client': {},
|
|
|
|
'openssh-server': {},
|
|
|
|
'openssh-sftp-server': {},
|
|
|
|
},
|
|
|
|
},
|
2021-02-18 13:24:57 +00:00
|
|
|
'pacman': {
|
|
|
|
'packages': {
|
|
|
|
'openssh': {},
|
|
|
|
},
|
|
|
|
},
|
2020-11-14 13:35:54 +00:00
|
|
|
}
|
2021-03-21 09:37:28 +00:00
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
|
|
'iptables/port_rules/22',
|
|
|
|
)
|
|
|
|
def iptables(metadata):
|
|
|
|
return {
|
|
|
|
'iptables': {
|
|
|
|
'port_rules': {
|
|
|
|
'22': atomic(metadata.get('openssh/restrict-to', set('*'))),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|