Edit File: __init__.cpython-311.pyc
� �gh% � �( � d dl Z d dlmZ d dlmZmZ d dlmZ d dlm Z d dl mZmZ d dl mZmZ dd lmZ eed f Z ed�� � d� � � Z e� � d efd�� � Zd efd�Z ed�� � d� � � Z G d� d� � ZdS )� N)� lru_cache)�AbstractSet�Tuple)� subprocess)�LooseVersion)�Firewall�UnifiedAccessLogger)�IP� IPVersion� )�Iptables.)�maxsizec �� � ddg} t j | t j �� � }|� � � � d� � \ }}|� � � S )N�iptablesz-V)�stderr�v)r �check_output�PIPE�decode�split�strip)�cmd�out�_�vstrings �[/opt/imunify360/venv/lib/python3.11/site-packages/im360/internals/core/firewall/__init__.py�iptables_versionr sP � ��t� �C� � !�#�j�o� >� >� >�C������#�#�C�(�(�J�A�w��=�=�?�?�� � ip_versionc �d � | t j k rdS t � � t d� � k S )z�ip6tables nat table correctly works only with kernel version >= 3.8 and iptables version >= 1.4.18 https://sector7g.be/posts/ipv6-nat-pre-routing-with-iptables Tz1.4.18)r �V4r r �r s r �is_nat_availabler# s/ � � �R�U����t��!�!�\�(�%;�%;�;�;r c � �@ K � t t � � | �� � S )N)�versionr )r r r"