9.2. Firewall

The firewall script acts as a firewall. It can be enabled for services sush as HTTP, FTP, SSH and SNMP.

9.2.1. Variables

These are the read-only pre-defined variables available for each connection that is established.

Variable Type Example Description
$family string “ipv4” IP family of connecting client (“ipv4” or “ipv6”)
$protocol string “tcp” IP protocol of local server (“tcp” or “udp”)
$service string “ssh” Name of local service (“ssh”, “snmp”, “ftp” or “httpserver:X”)
$senderip string “” IP address of connecting client
$senderport number 41666 TCP/UDP port of connecting client
$serverip string “” IP address of local server
$serverport number 22 TCP/UDP port of local server

9.2.2. Functions


Allow IP connection to be established.

Returns:doesn’t return, script is terminated

Block IP connection from being established.

Returns:doesn’t return, script is terminated

9.2.3. On script error

On script error Block() is called.

9.2.4. On implicit termination

If not explicitly terminated then Allow() is called.