firewall-1.7.0

KOSI Plugin Firewall Version 1.7.0

Required Plugins

  • osCheck
  • firewallD
  • IPTables

Summary

The Firewall Plugin allows you to manage your firewall settings efficiently. You can open or close ports, enable or disable the firewall, and retrieve the current firewall status. The plugin currently supports two firewall types:

Keys

Key Description
type Mandatory Specifies the firewall type to which actions will be applied (firewalld or iptables).
action Mandatory Defines the action to be performed (e.g., enable, disable, open, or close ports).
ports Mandatory Required when opening or closing ports. Accepts a list of ports in the format: “ports” or “ports-range”/protocol.
getFirewallStatus Mandatory Stores the 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']";
    );
}