Cleanup
This commit is contained in:
parent
b0797840af
commit
d9a4585e8d
1 changed files with 2 additions and 6 deletions
|
|
@ -95,11 +95,8 @@ function installLocalDNS () {
|
||||||
if [[ ! -e /etc/unbound/unbound.conf ]]; then
|
if [[ ! -e /etc/unbound/unbound.conf ]]; then
|
||||||
|
|
||||||
if [[ "$OS" = "debian" ]]; then
|
if [[ "$OS" = "debian" ]]; then
|
||||||
# Install Unbound
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y unbound
|
apt-get install -y unbound
|
||||||
|
|
||||||
# Configuration
|
|
||||||
echo 'interface: 10.8.0.1
|
echo 'interface: 10.8.0.1
|
||||||
access-control: 10.8.0.1/24 allow
|
access-control: 10.8.0.1/24 allow
|
||||||
hide-identity: yes
|
hide-identity: yes
|
||||||
|
|
@ -108,7 +105,6 @@ use-caps-for-id: yes
|
||||||
prefetch: yes' >> /etc/unbound/unbound.conf
|
prefetch: yes' >> /etc/unbound/unbound.conf
|
||||||
|
|
||||||
elif [[ "$OS" = "centos" ]]; then
|
elif [[ "$OS" = "centos" ]]; then
|
||||||
# Install Unbound
|
|
||||||
yum install -y unbound
|
yum install -y unbound
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
@ -119,7 +115,6 @@ prefetch: yes' >> /etc/unbound/unbound.conf
|
||||||
sed -i 's|use-caps-for-id: no|use-caps-for-id: yes|' /etc/unbound/unbound.conf
|
sed -i 's|use-caps-for-id: no|use-caps-for-id: yes|' /etc/unbound/unbound.conf
|
||||||
|
|
||||||
elif [[ "$OS" = "fedora" ]]; then
|
elif [[ "$OS" = "fedora" ]]; then
|
||||||
# Install Unbound
|
|
||||||
dnf install -y unbound
|
dnf install -y unbound
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
@ -430,7 +425,7 @@ else
|
||||||
echo ""
|
echo ""
|
||||||
echo "What DNS do you want to use with the VPN?"
|
echo "What DNS do you want to use with the VPN?"
|
||||||
echo " 1) Current system resolvers (from /etc/resolv.conf)"
|
echo " 1) Current system resolvers (from /etc/resolv.conf)"
|
||||||
echo " 2) Local DNS Resolver (Unbound will be configured)"
|
echo " 2) Self-hosted DNS Resolver (Unbound)"
|
||||||
echo " 3) Cloudflare (Anycast: worldwide)"
|
echo " 3) Cloudflare (Anycast: worldwide)"
|
||||||
echo " 4) Quad9 (Anycast: worldwide)"
|
echo " 4) Quad9 (Anycast: worldwide)"
|
||||||
echo " 5) FDN (France)"
|
echo " 5) FDN (France)"
|
||||||
|
|
@ -748,6 +743,7 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
|
# Install Unbound
|
||||||
installLocalDNS
|
installLocalDNS
|
||||||
echo 'push "dhcp-option DNS 10.8.0.1"' >> /etc/openvpn/server.conf
|
echo 'push "dhcp-option DNS 10.8.0.1"' >> /etc/openvpn/server.conf
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue