Skip to content

Commit ce4d3cf

Browse files
committed
Rebuilt target
1 parent ef14673 commit ce4d3cf

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

ks.el9-10.cfg

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ lang C.UTF-8
10171017
# Works with Debian 12
10181018
# Works with Debian 13, although atm no scap profile is available as of 27-08-2025
10191019

1020-
SCRIPT_BUILD="2025120202"
1020+
SCRIPT_BUILD="2025120601"
10211021

10221022
# Note that all variables can be overridden by kernel arguments
10231023
# Example: Override BRAND_NAME with kernel argument: NPF_BRAND_NAME=MyBrand
@@ -1116,6 +1116,9 @@ CONFIGURE_FAIL2BAN=true
11161116
# Optional whitelist IPs / CIDR for Fail2ban
11171117
FAIL2BAN_IGNORE_IP_LIST="${FIREWALL_WHITELIST_IP_LIST}"
11181118

1119+
# Keep ipv4 forwarding active (necessary for container setups and most routing setups)
1120+
KEEP_IPV4_FORWARDING=false
1121+
11191122
# Optional allow non protected fs symlinks
11201123
# Will be necessary for docker to write to /dev/stdout via mount --bind links
11211124
ALLOW_UNPROTECTED_FS_SYMLINKS=false
@@ -3057,6 +3060,20 @@ EOF
30573060
chmod +x /usr/local/bin/el_configurator_metrics.sh || log "Failed to chmod /usr/local/bin/el_configurator_metrics.sh" "ERROR"
30583061
fi
30593062

3063+
if [ "${KEEP_IPV4_FORWARDING}" != false ]; then
3064+
log "Keeping IPv4 forwarding enabled"
3065+
sysctl -w net.ipv4.ip_forward=1 2>> "${LOG_FILE}" || log "Failed to set net.ipv4.ip_forward at runtime" "ERROR"
3066+
# This file is created by OpenSCAP profiles on EL systems
3067+
if [ -f /etc/sysctl.d/99-sysctl.conf ]; then
3068+
set_conf_value /etc/sysctl.d/99-sysctl.conf "net.ipv4.ip_forward" "1" || log "Failed to set net.ipv4.ip_forward in /etc/sysctl.d/99-sysctl.conf" "ERROR"
3069+
else
3070+
# Create our own file to enforce the setting
3071+
set_conf_value /etc/sysctl.d/99-ipv4-forward.conf "net.ipv4.ip_forward" "1" || log "Failed to set net.ipv4.ip_forward in /etc/sysctl.d/99-ipv4-forward.conf" "ERROR"
3072+
fi
3073+
# We also need to patch /etc/sysctl.conf since OpenScap and others may disable the setting there too
3074+
set_conf_value /etc/sysctl.conf "net.ipv4.ip_forward" "1" || log "Failed to set net.ipv4.ip_forward in /etc/sysctl.conf" "ERROR"
3075+
fi
3076+
30603077
if [ "${ALLOW_UNPROTECTED_FS_SYMLINKS}" != false ]; then
30613078
log "Allowing unprotected symlinks in filesystems"
30623079
sysctl -w fs.protected_symlinks=0 2>> "${LOG_FILE}" || log "Failed to set fs.protected_symlinks at runtime" "ERROR"
@@ -3200,4 +3217,6 @@ fi
32003217
sync; echo 3 > /proc/sys/vm/drop_caches
32013218

32023219
log "Finished at $(date) with state ${POST_INSTALL_SCRIPT_GOOD}"
3220+
%end
3221+
32033222
reboot --eject

0 commit comments

Comments
 (0)