mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Introduce firewall component for opening/closing ports
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
4c4a59e5fe
commit
ca2c7dbeb0
48 files changed
+647
-401
No files matched your search
@@ -22,8 +22,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, menu
|
||||
from plinth import menu
|
||||
from plinth import service as service_module
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.views import ServiceView
|
||||
|
||||
from .manifest import backup
|
||||
@@ -62,6 +63,10 @@ class SSHApp(app_module.App):
|
||||
'ssh:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
firewall = Firewall('firewall-ssh', name, ports=['ssh'],
|
||||
is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
|
||||
def init():
|
||||
"""Intialize the ssh module."""
|
||||
@@ -70,8 +75,7 @@ def init():
|
||||
app.set_enabled(True)
|
||||
|
||||
global service
|
||||
service = service_module.Service(managed_services[0], name, ports=['ssh'],
|
||||
is_external=True)
|
||||
service = service_module.Service(managed_services[0], name)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
|
||||
Reference in new issue
Block a user