Fix 'proto' option for IPv6
This commit is contained in:
parent
91a69b4779
commit
8664adde59
1 changed files with 12 additions and 5 deletions
|
|
@ -502,11 +502,19 @@ WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
|
||||||
|
|
||||||
# Generate server.conf
|
# Generate server.conf
|
||||||
echo "port $PORT" > /etc/openvpn/server.conf
|
echo "port $PORT" > /etc/openvpn/server.conf
|
||||||
|
if [[ "$IPV6" = 'n' ]]; then
|
||||||
if [[ "$PROTOCOL" = 'UDP' ]]; then
|
if [[ "$PROTOCOL" = 'UDP' ]]; then
|
||||||
echo "proto udp" >> /etc/openvpn/server.conf
|
echo "proto udp" >> /etc/openvpn/server.conf
|
||||||
elif [[ "$PROTOCOL" = 'TCP' ]]; then
|
elif [[ "$PROTOCOL" = 'TCP' ]]; then
|
||||||
echo "proto tcp" >> /etc/openvpn/server.conf
|
echo "proto tcp" >> /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
elif [ "$IPV6" = 'y' ]]; then
|
||||||
|
if [[ "$PROTOCOL" = 'UDP' ]]; then
|
||||||
|
echo "proto udp6" >> /etc/openvpn/server.conf
|
||||||
|
elif [[ "$PROTOCOL" = 'TCP' ]]; then
|
||||||
|
echo "proto tcp6" >> /etc/openvpn/server.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo "dev tun
|
echo "dev tun
|
||||||
user nobody
|
user nobody
|
||||||
group $NOGROUP
|
group $NOGROUP
|
||||||
|
|
@ -567,7 +575,6 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
||||||
|
|
||||||
if [[ "$IPV6" = 'y' ]]; then
|
if [[ "$IPV6" = 'y' ]]; then
|
||||||
echo 'server-ipv6 fd6c:62d9:eb8c::/112
|
echo 'server-ipv6 fd6c:62d9:eb8c::/112
|
||||||
proto udp6
|
|
||||||
tun-ipv6
|
tun-ipv6
|
||||||
push tun-ipv6
|
push tun-ipv6
|
||||||
push "route-ipv6 2000::/3"
|
push "route-ipv6 2000::/3"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue