# open sepecified ports for devices in the local network
def internally_allow_ports(interfaces_details: List, internally_allowed: List) -> None:
for interface in interfaces_details:
# if interface is active with an IP in it, and not "tun*"
if len(interface) == 3 and "tun" not in interface[0]:
# Allow the specified ports on internal network
for port in internally_allowed:
To firewall.py:
Add this block
Add this block: