mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
firewall: Don't show tun interface in internal zone warning
- We are mention in the internal zone warning that services are available when connected over VPN. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
e7be53723f
commit
d379c981bb
@ -4,6 +4,7 @@ App component for other apps to use firewall functionality.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import re
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@ -100,8 +101,16 @@ class Firewall(app.FollowerComponent):
|
||||
|
||||
@staticmethod
|
||||
def get_internal_interfaces():
|
||||
"""Returns a list of interfaces in a firewall zone."""
|
||||
return firewall.get_interfaces('internal')
|
||||
"""Returns a list of interfaces in a firewall zone.
|
||||
|
||||
Filter out tun interfaces as they are always assumed to be internal
|
||||
interfaces.
|
||||
|
||||
"""
|
||||
return [
|
||||
interface for interface in firewall.get_interfaces('internal')
|
||||
if not re.fullmatch(r'tun\d+', interface)
|
||||
]
|
||||
|
||||
def diagnose(self):
|
||||
"""Check if the firewall ports are open and only as expected.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user