ok
Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/im360/internals/core/rules/ |
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/im360/internals/core/rules/drop.py |
"""Blacklist [drop.sync] specific rules customization.""" from typing import Iterator from im360.internals.core.firewall import FirewallRules from im360.utils.validate import IPVersion from .types_ import FirewallRule def rules( ipset_name: str, ip_version: IPVersion, priority=FirewallRules.BLACKLIST_PRIORITY, ) -> Iterator[FirewallRule]: """Yield iptables *ip_version* drop.sync rules for *ipset_name*.""" yield FirewallRule( rule=FirewallRules.ipset_rule( ipset_name, FirewallRules.LOG_BLACKLIST_CHAIN ), priority=priority, )