diff --git a/openvpn-install.sh b/openvpn-install.sh index c7a8631..e066091 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -755,6 +755,7 @@ 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 + # Copy, if it's a IPv4 |or| if IPv6 is enabled, IPv4/IPv6 does not matter if [[ "$line" =~ ^[0-9.]*$ ]] || [[ "$IPV6_SUPPORT" == 'y' ]]; then echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf fi