Skip to content

Commit d60dc43

Browse files
对应腾讯云设置了net.ipv4.ip_forward = 0,openvpn异常的提示
1 parent 4c074b0 commit d60dc43

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

openvpn-install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function installQuestions () {
280280
echo " 5) Quad9 uncensored (Anycast: worldwide)"
281281
echo " 6) FDN (France)"
282282
echo " 7) DNS.WATCH (Germany)"
283-
echo " 8) OpenDNS (Anycast: worldwide)"
283+
echo " 8) 114DNS"
284284
echo " 9) Google (Anycast: worldwide)"
285285
echo " 10) Yandex Basic (Russia)"
286286
echo " 11) AdGuard DNS (Russia)"
@@ -800,8 +800,16 @@ verb 3" >> /etc/openvpn/server.conf
800800
if [[ "$IPV6_SUPPORT" = 'y' ]]; then
801801
echo 'net.ipv6.conf.all.forwarding=1' >> /etc/sysctl.d/20-openvpn.conf
802802
fi
803+
803804
# Avoid an unneeded reboot
804805
sysctl --system
806+
sysctl -a | grep "net.ipv4.ip_forward = 1"
807+
if [ $? = 0 ]
808+
then
809+
echo "路由功能开启成功"
810+
else
811+
echo "路由功能开启失败,请检查/etc/sysctl.conf 或者 /etc/sysctl.d/ 文件"
812+
fi
805813

806814
# If SELinux is enabled and a custom port was selected, we need this
807815
if hash sestatus 2>/dev/null; then

0 commit comments

Comments
 (0)