Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 799 Bytes

bind.md

File metadata and controls

55 lines (38 loc) · 799 Bytes

BIND

Installation

# Using Homebrew
brew install bind

# Using YUN
yum check-update
sudo yum -y install bind

# Using APT
sudo apt update
sudo apt -y install bind9

# Using APK
sudo apk update
sudo apk add bind

Configuration

Listen on

sudo sed -ri "/^\tlisten-on port 53/ s/127.0.0.1;/127.0.0.1; $(hostname -I | awk '{print $2}');/g" /etc/named.conf

Allow query

sudo sed -ri "/^\tallow-query/s_localhost;_localhost; $(ip route | awk 'NR==3 {print $1}');_g" /etc/named.conf

Any

sudo sed -ri '/\tallow-query/ s/localhost/any/g' /etc/named.conf

Forwarders

\n\tforwarders { 8.8.8.8; [ip-address]; };