hotfix: use echo instead of sysctl to set ipv4 ip_forward feature (#518)

This commit is contained in:
naison
2025-04-06 18:34:34 +08:00
committed by GitHub
parent ea574a756b
commit 60c3030e65
6 changed files with 23 additions and 17 deletions

View File

@@ -35,9 +35,9 @@ spec:
- args:
{{- if eq .Values.netstack "system" }}
- |
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.all.forwarding=1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
update-alternatives --set iptables /usr/sbin/iptables-legacy
iptables -P INPUT ACCEPT
ip6tables -P INPUT ACCEPT