From c780eb400d743d257ddb9108b241b5b07490aa9e Mon Sep 17 00:00:00 2001 From: Henry N Date: Thu, 2 Apr 2020 20:48:56 +0200 Subject: [PATCH] Comments for IPv4 filter from resolve.conf --- openvpn-install.sh | 1 + 1 file changed, 1 insertion(+) 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