Remove duplicate lines and fix for DNS rebinding not applied
This commit is contained in:
parent
99d4b59b30
commit
c015a62bb8
1 changed files with 6 additions and 21 deletions
|
|
@ -802,9 +802,6 @@ hide-version: yes
|
||||||
use-caps-for-id: yes
|
use-caps-for-id: yes
|
||||||
prefetch: yes' >> /etc/unbound/unbound.conf
|
prefetch: yes' >> /etc/unbound/unbound.conf
|
||||||
|
|
||||||
# Restart Unbound
|
|
||||||
service unbound restart
|
|
||||||
|
|
||||||
elif [[ "$OS" = "centos" ]]; then
|
elif [[ "$OS" = "centos" ]]; then
|
||||||
# Install Unbound
|
# Install Unbound
|
||||||
yum install -y unbound
|
yum install -y unbound
|
||||||
|
|
@ -816,12 +813,6 @@ prefetch: yes' >> /etc/unbound/unbound.conf
|
||||||
sed -i 's|# hide-version: no|hide-version: yes|' /etc/unbound/unbound.conf
|
sed -i 's|# hide-version: no|hide-version: 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
|
||||||
|
|
||||||
# Enable service at boot
|
|
||||||
systemctl enable unbound
|
|
||||||
|
|
||||||
# Start the service
|
|
||||||
systemctl start unbound
|
|
||||||
|
|
||||||
elif [[ "$OS" = "fedora" ]]; then
|
elif [[ "$OS" = "fedora" ]]; then
|
||||||
# Install Unbound
|
# Install Unbound
|
||||||
dnf install -y unbound
|
dnf install -y unbound
|
||||||
|
|
@ -833,12 +824,6 @@ prefetch: yes' >> /etc/unbound/unbound.conf
|
||||||
sed -i 's|# hide-version: no|hide-version: yes|' /etc/unbound/unbound.conf
|
sed -i 's|# hide-version: no|hide-version: 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
|
||||||
|
|
||||||
# Enable service at boot
|
|
||||||
systemctl enable unbound
|
|
||||||
|
|
||||||
# Start the service
|
|
||||||
systemctl start unbound
|
|
||||||
|
|
||||||
elif [[ "$OS" = "arch" ]]; then
|
elif [[ "$OS" = "arch" ]]; then
|
||||||
# Install Unbound
|
# Install Unbound
|
||||||
pacman -Syu unbound expat
|
pacman -Syu unbound expat
|
||||||
|
|
@ -866,17 +851,17 @@ hide-identity: yes
|
||||||
hide-version: yes
|
hide-version: yes
|
||||||
qname-minimisation: yes
|
qname-minimisation: yes
|
||||||
prefetch: yes' > /etc/unbound/unbound.conf
|
prefetch: yes' > /etc/unbound/unbound.conf
|
||||||
|
|
||||||
# Enable service at boot
|
|
||||||
systemctl enable unbound
|
|
||||||
|
|
||||||
# Start the service
|
|
||||||
systemctl start unbound
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DNS Rebinding fix
|
# DNS Rebinding fix
|
||||||
PRIVATE_ADDRESSES="10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 169.254.0.0/16 127.0.0.0/8"
|
PRIVATE_ADDRESSES="10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 169.254.0.0/16 127.0.0.0/8"
|
||||||
echo "private-address: $PRIVATE_ADDRESSES" >> /etc/unbound/unbound.conf
|
echo "private-address: $PRIVATE_ADDRESSES" >> /etc/unbound/unbound.conf
|
||||||
|
|
||||||
|
# Enable service at boot
|
||||||
|
systemctl enable unbound
|
||||||
|
|
||||||
|
# Restart the service
|
||||||
|
systemctl restart unbound
|
||||||
else
|
else
|
||||||
echo "Unbound is already installed."
|
echo "Unbound is already installed."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue