D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
im360
/
internals
/
core
/
rules
/
Filename :
drop.py
back
Copy
"""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, )