code: def allow(ip,
          port=None,
          proto='tcp',
          direction='in',
          port_origin='d',
          ip_origin='s',
          ttl=None,
          comment=''):
      '''
      Add an rule to csf allowed hosts
      See :func:`_access_rule`.
      1- Add an IP:
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' csf.allow 127.0.0.1
          salt '*' csf.allow 127.0.0.1 comment="Allow localhost"
      '''
      return _access_rule('allow',
                          ip,
                          port=port,
                          proto=proto,
                          direction=direction,
                          port_origin=port_origin,
                          ip_origin=ip_origin,
                          comment=commentf allow(ip,
          port=None,
          proto='tcp',
          direction='in',
          port_origin='d',
          ip_origin='s',
          ttl=None,
          comment=''):
      '''
      Add an rule to csf allowed hosts
      See :func:`_access_rule`.
      1- Add an IP:
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' csf.allow 127.0.0.1
          salt '*' csf.allow 127.0.0.1 comment="Allow localhost"
      '''
      return _access_rule('allow',
                          ip,
                          port=port,
                          proto=proto,
                          direction=direction,
                          port_origin=port_origin,
                          ip_origin=ip_origin,
                          comment=comment)
docs: Add an rule to csf allowed hosts
      See :func:`_access_rule`.
      1- Add an IP:
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' csf.allow 127.0.0.1
          salt '*' csf.allow 127.0.0.1 comment="Allow localhost"