You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Keep ipv4 forwarding active (necessary for container setups and most routing setups)
1120
+
KEEP_IPV4_FORWARDING=false
1121
+
1119
1122
# Optional allow non protected fs symlinks
1120
1123
# Will be necessary for docker to write to /dev/stdout via mount --bind links
1121
1124
ALLOW_UNPROTECTED_FS_SYMLINKS=false
@@ -3057,6 +3060,20 @@ EOF
3057
3060
chmod +x /usr/local/bin/el_configurator_metrics.sh || log "Failed to chmod /usr/local/bin/el_configurator_metrics.sh""ERROR"
3058
3061
fi
3059
3062
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
+
3060
3077
if [ "${ALLOW_UNPROTECTED_FS_SYMLINKS}" != false ]; then
3061
3078
log "Allowing unprotected symlinks in filesystems"
3062
3079
sysctl -w fs.protected_symlinks=0 2>> "${LOG_FILE}" || log "Failed to set fs.protected_symlinks at runtime""ERROR"
@@ -3200,4 +3217,6 @@ fi
3200
3217
sync; echo 3 > /proc/sys/vm/drop_caches
3201
3218
3202
3219
log "Finished at $(date) with state ${POST_INSTALL_SCRIPT_GOOD}"
0 commit comments