mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-09 09:10:42 +08:00
feat: optimize args
This commit is contained in:
@@ -49,8 +49,8 @@ sysctl net.ipv4.ip_forward=1
|
|||||||
sysctl -w net.ipv4.conf.all.route_localnet=1
|
sysctl -w net.ipv4.conf.all.route_localnet=1
|
||||||
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -P INPUT ACCEPT || true
|
iptables -P INPUT ACCEPT
|
||||||
iptables -P FORWARD ACCEPT || true
|
iptables -P FORWARD ACCEPT
|
||||||
iptables -t nat -A PREROUTING ! -p icmp -j DNAT --to $(LocalTunIP)
|
iptables -t nat -A PREROUTING ! -p icmp -j DNAT --to $(LocalTunIP)
|
||||||
iptables -t nat -A POSTROUTING ! -p icmp -j MASQUERADE
|
iptables -t nat -A POSTROUTING ! -p icmp -j MASQUERADE
|
||||||
iptables -t nat -A OUTPUT -o lo ! -p icmp -j DNAT --to-destination $(LocalTunIP)
|
iptables -t nat -A OUTPUT -o lo ! -p icmp -j DNAT --to-destination $(LocalTunIP)
|
||||||
|
@@ -126,8 +126,8 @@ func CreateOutboundPod(clientset *kubernetes.Clientset, namespace string, traffi
|
|||||||
sysctl net.ipv4.ip_forward=1
|
sysctl net.ipv4.ip_forward=1
|
||||||
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -P INPUT ACCEPT || true
|
iptables -P INPUT ACCEPT
|
||||||
iptables -P FORWARD ACCEPT || true
|
iptables -P FORWARD ACCEPT
|
||||||
iptables -t nat -A POSTROUTING -s ${CIDR} -o eth0 -j MASQUERADE
|
iptables -t nat -A POSTROUTING -s ${CIDR} -o eth0 -j MASQUERADE
|
||||||
kubevpn serve -L tcp://:10800 -L tun://:8422?net=${TrafficManagerIP} --debug=true`,
|
kubevpn serve -L tcp://:10800 -L tun://:8422?net=${TrafficManagerIP} --debug=true`,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user