26 lines
500 B
Python
26 lines
500 B
Python
from bundlewrap.metadata import atomic
|
|
|
|
defaults = {
|
|
'apt': {
|
|
'packages': {
|
|
'proftpd-core': {},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'firewall/port_rules',
|
|
)
|
|
def firewall(metadata):
|
|
sources = atomic(metadata.get('mosquitto/restrict-to', set()))
|
|
|
|
return {
|
|
'firewall': {
|
|
'port_rules': {
|
|
'20/tcp': sources,
|
|
'21/tcp': sources,
|
|
'49152-50192/tcp': sources,
|
|
},
|
|
},
|
|
}
|