diff --git a/openvpn-install.sh b/openvpn-install.sh index de1531a..c7a8631 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -755,7 +755,9 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf fi # 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 - echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf + if [[ "$line" =~ ^[0-9.]*$ ]] || [[ "$IPV6_SUPPORT" == 'y' ]]; then + echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf + fi done ;; 2)