From 6678fecb179ccbd8b0f7067f13024a92f2c115e8 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 27 May 2025 00:48:13 +0200 Subject: [PATCH] Update network.sh --- src/network.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network.sh b/src/network.sh index ff154a5..ceac94f 100644 --- a/src/network.sh +++ b/src/network.sh @@ -209,8 +209,9 @@ configureNAT() { # Check port forwarding flag if [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then - { sysctl -w net.ipv4.ip_forward=1 > /dev/null; rc=$?; } || : + { sysctl -w net.ipv4.ip_forward=1 > /dev/null 2>&1; rc=$?; } || : if (( rc != 0 )) || [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then + [[ "$PODMAN" == [Yy1]* ]] && return 1 error "IP forwarding is disabled. $ADD_ERR --sysctl net.ipv4.ip_forward=1" return 1 fi