only IPv4 from resolve.conf, if IPv6 disabled
Do not copy IPv6 DNS from resolve.conf, if IPV6_SUPPORT is not enabled.
This commit is contained in:
parent
4ddf640a79
commit
5aee112442
1 changed files with 3 additions and 1 deletions
|
|
@ -755,7 +755,9 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
# Obtain the resolvers from resolv.conf and use them for OpenVPN
|
# Obtain the resolvers from resolv.conf and use them for OpenVPN
|
||||||
sed -ne 's/^nameserver[[:space:]]\+\([^[:space:]]\+\).*$/\1/p' $RESOLVCONF | while read -r line; do
|
sed -ne 's/^nameserver[[:space:]]\+\([^[:space:]]\+\).*$/\1/p' $RESOLVCONF | while read -r line; do
|
||||||
|
if [[ "$line" =~ ^[0-9.]*$ ]] || [[ "$IPV6_SUPPORT" == 'y' ]]; then
|
||||||
echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf
|
echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue