Baseline hardening
“Baseline hardening” is the master switch in this generator for a bundle of conservative management defaults. When it is on, the script emits the related config system global lines for admin Telnet (if “Disable admin Telnet” is checked), HTTPS and console idle timeouts, and TLS 1.2/1.3 restriction (when that sub‑option is checked and FortiOS is new enough).
Other checkboxes in this section—maintainer handling, GUI IPv6 off, LLDP off, and SNMP off—still have their own toggles, but in the generated CLI their matching blocks are only emitted when baseline hardening is enabled. If you turn baseline hardening off, those SNMP/LLDP snippets are skipped even if their boxes stay checked, so review both controls together.
Disable admin Telnet
FortiOS can expose a Telnet listener for remote CLI administration. Telnet is unencrypted, so credentials and configuration details traverse the network in plaintext if it is ever enabled.
This generator emits set admin-telnet disable under config system global when Apply baseline hardening is on and this box is checked. If baseline hardening is off, the Telnet line is not written even if this remains checked.
TLS 1.2 and 1.3 only
This maps to set admin-https-ssl-versions tlsv1-2 tlsv1-3 in config system global, which stops the device from negotiating legacy SSL/TLS versions for the HTTPS management interface.
The line is emitted only when Apply baseline hardening is enabled, this checkbox is on, and the selected FortiOS target is 6.4 or newer (older trains did not support the same attribute shape in this generator). Pair this with updated management clients; very old browsers or scripts that insist on TLS 1.0/1.1 will fail to load the GUI.
Disable SNMP
Simple Network Management Protocol lets operators poll the FortiGate for metrics, interface tables, and sysInfo. Disabling it shrinks the attack surface on management LANs where no SNMP collector is used.
This generator writes config system snmp sysinfo with set status disable when both Apply baseline hardening and this checkbox are enabled. SNMP remains active in the output if baseline hardening is turned off, regardless of this box.
Disable GUI IPv6
When combined with Apply baseline hardening, this adds config system settings with set gui-ipv6 disable, which hides IPv6-oriented controls in the FortiGate GUI to reduce accidental dual-stack policy mistakes on networks that are IPv4-only operationally.
On FortiOS 6.0 and later in this template, the same stanza also sets set inspection-mode flow where applicable. This is not a substitute for a full IPv6 rollout plan; it only affects the management experience and related global settings emitted here. If baseline hardening is off, this block is skipped.
Disable LLDP
Link Layer Discovery Protocol advertises identity, port description, and management capabilities to directly connected neighbors. That is convenient for automated documentation, but it also leaks topology details to anything on the wire that listens for LLDP frames.
When enabled together with Apply baseline hardening, this option adds config system lldp with set status disable for FortiOS 5.4 and newer. If baseline hardening is off, no LLDP block is written even if this stays checked.
Generate DHCP servers
When enabled, the script builds one config system dhcp server entry per active internal interface that has a usable IPv4 scope: the LAN switch, the optional WiFi switch (if configured), and the optional guest VLAN interface (if configured).
Each server uses the interface’s address as the default gateway, derives the subnet mask from your CIDR, allocates a single contiguous ip-range between the network and broadcast addresses (skipping the gateway when it would collide), sets dns-service default, and omits DHCP entirely for /31 or shorter prefixes where a range cannot be formed. Turn this off if you will point clients to an external DHCP appliance or want to author DHCP by hand.