環境:Ubuntu 16.04 - DNS Server
安裝
hostname
:顯示hostnamehostname -h
:求救hostname -b google
:將hostname更改為google
apt install bind9
:安裝DNS Serverapt install dnsutils
:DNS測試工具(應包含在bind9了)
ufw status
:查看ubuntu防火牆狀態
NameCheap設定
申請google.me網域
在側邊欄點DashBoard -> MANAGE
NAMESERVERS -> Custom DNS -> 輸入兩個DNS Server(ns1.google.me./ns2.google.me)
Advanced DNS -> PERSONAL DNS SERVER 綁定IP
設定檔
cd /etc/bind/
:bind設定檔位置
vim /etc/bind/named.conf.local
:加入domain zone
cp db.local db.google.me
vim db.google.me
:詳細設定
google.me
的NS是ns2.google.me
ns2.google.me
指向的IP為自己www.google.me
=yyy.yyy.yyy.yyygoogle.me
=yyy.yyy.yyy.yyy
開啟
systemctl start bind9.service
systemctl restart bind9.service
systemctl status bind9.service