mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-10-31 05:57:36 +01:00 
			
		
		
		
	feat: push IPv6 endpoint with DHCP when self-hosted DNS resolver is in use (#600)
Co-authored-by: randomshell <43271778+randomshell@users.noreply.github.com> Co-authored-by: Stanislas <angristan@pm.me>
This commit is contained in:
		| @@ -160,9 +160,16 @@ prefetch: yes' >>/etc/unbound/unbound.conf | ||||
| 	prefetch: yes' >/etc/unbound/unbound.conf | ||||
| 		fi | ||||
| 		 | ||||
| 		# IPv6 DNS for all OS | ||||
| 		if [[ "$IPV6_SUPPORT" == 'y' ]]; then | ||||
| 			echo 'interface: fd42:42:42:42::1 | ||||
| access-control: fd42:42:42:42::/112 allow' >> /etc/unbound/unbound.conf | ||||
| 		fi | ||||
|  | ||||
| 		if [[ ! $OS =~ (fedora|centos|amzn) ]]; then | ||||
| 			# DNS Rebinding fix | ||||
| 			echo "private-address: 10.0.0.0/8 | ||||
| private-address: fd42:42:42:42::/112 | ||||
| private-address: 172.16.0.0/12 | ||||
| private-address: 192.168.0.0/16 | ||||
| private-address: 169.254.0.0/16 | ||||
| @@ -183,13 +190,18 @@ hide-version: yes | ||||
| use-caps-for-id: yes | ||||
| prefetch: yes | ||||
| private-address: 10.0.0.0/8 | ||||
| private-address: fd42:42:42:42::/112 | ||||
| private-address: 172.16.0.0/12 | ||||
| private-address: 192.168.0.0/16 | ||||
| private-address: 169.254.0.0/16 | ||||
| private-address: fd00::/8 | ||||
| private-address: fe80::/10 | ||||
| private-address: 127.0.0.0/8 | ||||
| private-address: ::ffff:0:0/96' >/etc/unbound/openvpn.conf | ||||
| private-address: ::ffff:0:0/96' > /etc/unbound/openvpn.conf | ||||
| 		if [[ "$IPV6_SUPPORT" == 'y' ]]; then | ||||
| 			echo 'interface: fd42:42:42:42::1 | ||||
| access-control: fd42:42:42:42::/112 allow' >> /etc/unbound/openvpn.conf | ||||
| 		fi | ||||
| 	fi | ||||
|  | ||||
| 	systemctl enable unbound | ||||
| @@ -784,8 +796,11 @@ ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf | ||||
| 			fi | ||||
| 		done | ||||
| 		;; | ||||
| 	2) # Self-hosted DNS resolver (Unbound) | ||||
| 		echo 'push "dhcp-option DNS 10.8.0.1"' >>/etc/openvpn/server.conf | ||||
| 		2) # Self-hosted DNS resolver (Unbound) | ||||
| 			echo 'push "dhcp-option DNS 10.8.0.1"' >> /etc/openvpn/server.conf | ||||
| 			if [[ "$IPV6_SUPPORT" == 'y' ]]; then | ||||
| 				echo 'push "dhcp-option DNS fd42:42:42:42::1"' >> /etc/openvpn/server.conf | ||||
| 			fi | ||||
| 		;; | ||||
| 	3) # Cloudflare | ||||
| 		echo 'push "dhcp-option DNS 1.0.0.1"' >>/etc/openvpn/server.conf | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Henry N
					Henry N