diff --git a/pkg/preflights/host-preflight.yaml b/pkg/preflights/host-preflight.yaml index 546a45c7b..4314c81f3 100644 --- a/pkg/preflights/host-preflight.yaml +++ b/pkg/preflights/host-preflight.yaml @@ -148,6 +148,10 @@ spec: exclude: '{{ eq .GlobalCIDR.CIDR "" }}' CIDRRangeAlloc: '{{ .GlobalCIDR.CIDR }}' desiredCIDR: {{.GlobalCIDR.Size}} + - run: + collectorName: "kernel-parameters" + command: "sysctl" + args: ["-a"] analyzers: - cpu: checkName: CPU @@ -834,3 +838,14 @@ spec: - pass: when: "a-subnet-is-available" message: Specified CIDR is available. + - textAnalyze: + checkName: IP forwarding + fileName: host-collectors/run-host/kernel-parameters.txt + regex: 'net.ipv4.ip_forward = 1' + outcomes: + - pass: + when: "true" + message: IP forwarding is enabled. + - fail: + when: "false" + message: IP forwarding must be enabled. To enable it, edit /etc/sysctl.conf, add or uncomment the line 'net.ipv4.ip_forward=1', and run 'sudo sysctl -p'.