Firewall-2.2.0

Required license: KOSI Enterprise

KOSI Plugin Firewall Version 2.2.0

Required Plugins

  • osCheck
  • firewallD
  • IPTables

Summary

The Firewall Plugin allows you to manage your firewall settings efficiently. It supports opening and closing ports, enabling and disabling the firewall, and retrieving the current firewall status.

The following firewall types are currently supported:

Keys

Key Description
type Mandatory Specifies the firewall type to which actions will be applied (firewalld or iptables).
action Mandatory Defines the action to perform (e.g., enable, disable, open, or close ports).
ports Mandatory Required only when the action is open or close. Accepts a list of ports in the format: “ports” or “ports-range”/protocol.
getFirewallStatus Mandatory Stores the detected firewall status, which can be either “running” or “not running”. If both firewalld and iptables are running, firewalld is selected.

Example

languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-packagev3";
description = "kosi-example-package";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";

files =
{
    input = "template.yaml";
}

containers =
{
    example = ["docker.io", "nginx", "latest"];
}

install
{
    firewall
    (
        type = "firewalld";
        action = "close / open / disable";
        ports = "['5555/tcp','6666/tcp','8888-9999/udp']";
        getFirewallStatus = "status";
    );

    fprint
    (
        message = "The firewall is {0}"; 
        variables = "['status']";
    );
}