HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/firewall.cpython-310.pyc
o

�N�gR�@sdZdd�Zddd�ZdS)zD
State to check firewall configurations

.. versionadded:: 2016.3.0
cCsdtvrdSdS)z(
    Load only if network is loaded
    �network.connectZfirewall)Fz"network module could not be loaded)�__salt__�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/firewall.py�__virtual__srNcKsx|}|didd�}d|vrt�dd�|d<|dr#d|d<d|d<|Std	||fi|��}|d|d<|d|d<|S)
a�
    Checks if there is an open connection from the minion to the defined
    host on a specific port.

    name
      host name or ip address to test connection to

    port
      The port to test the connection on

    kwargs
      Additional parameters, parameters allowed are:
        proto (tcp or udp)
        family (ipv4 or ipv6)
        timeout

    .. code-block:: yaml

      testgoogle:
        firewall.check:
          - name: 'google.com'
          - port: 80
          - proto: 'tcp'

    T�)�name�resultZchanges�comment�testFrzThe connection will be testedr	r)Z__opts__�getr)r�port�kwargs�host�ret�resultsrrr�checks�r)N)�__doc__rrrrrr�<module>s