mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-10-31 05:57:36 +01:00 
			
		
		
		
	feat(install): get system IPv6 resolvers if enabled (#599)
This commit is contained in:
		| @@ -780,8 +780,11 @@ ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf | ||||
| 			RESOLVCONF='/etc/resolv.conf' | ||||
| 		fi | ||||
| 		# Obtain the resolvers from resolv.conf and use them for OpenVPN | ||||
| 		grep -v '#' $RESOLVCONF | grep 'nameserver' | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | while read -r line; do | ||||
| 			echo "push \"dhcp-option DNS $line\"" >>/etc/openvpn/server.conf | ||||
| 		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 | ||||
| 		done | ||||
| 		;; | ||||
| 	2) # Self-hosted DNS resolver (Unbound) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Henry N
					Henry N