diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 46dcb72ae..ddea81ecc 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -13,14 +13,17 @@ load_functions verb_ip6() { set_std_mode # Set STD mode based on VERBOSE - if [ "$IPV6_METHOD" == "none" ] || [ "$DISABLEIPV6" == "yes" ]; then - msg_info "Disabling IPv6" + if [ "$IPV6_METHOD" == "disable" ]; then + msg_info "Disabling IPv6 (this may affect some services)" $STD sysctl -w net.ipv6.conf.all.disable_ipv6=1 $STD sysctl -w net.ipv6.conf.default.disable_ipv6=1 $STD sysctl -w net.ipv6.conf.lo.disable_ipv6=1 - echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - echo "net.ipv6.conf.default.disable_ipv6 = 1" >>/etc/sysctl.conf - echo "net.ipv6.conf.lo.disable_ipv6 = 1" >>/etc/sysctl.conf + mkdir -p /etc/sysctl.d + $STD tee /etc/sysctl.d/99-disable-ipv6.conf >/dev/null <&1 1>&2 2>&3) [ $? -ne 0 ] && exit_script @@ -680,7 +681,15 @@ advanced_settings() { break ;; none) - echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}Disabled${CL}" + echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}None${CL}" + IPV6_ADDR="none" + IPV6_GATE="" + break + ;; + disable) + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox \ + "⚠️ WARNING - FULLY DISABLE IPv6:\n\nThis will completely disable IPv6 inside the container via sysctl.\n\nSide Effects:\n • Services requiring IPv6 will fail\n • Localhost IPv6 (::1) will not work\n • Some applications may not start\n\nOnly use if you have a specific reason to completely disable IPv6.\n\nFor most use cases, select 'None' instead." 14 70 + echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}Fully Disabled (IPv6 disabled via sysctl)${CL}" IPV6_ADDR="none" IPV6_GATE="" break diff --git a/misc/install.func b/misc/install.func index 0c9d07299..bd51cde15 100644 --- a/misc/install.func +++ b/misc/install.func @@ -15,12 +15,16 @@ load_functions verb_ip6() { set_std_mode # Set STD mode based on VERBOSE - if [ "$IPV6_METHOD" == "none" ] || [ "$DISABLEIPV6" == "yes" ]; then - msg_info "Disabling IPv6" - $STD echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD echo "net.ipv6.conf.default.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD echo "net.ipv6.conf.lo.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD sysctl -p + if [ "$IPV6_METHOD" == "disable" ]; then + msg_info "Disabling IPv6 (this may affect some services)" + mkdir -p /etc/sysctl.d + $STD tee /etc/sysctl.d/99-disable-ipv6.conf >/dev/null <