上課筆記
  • 20190227
  • 20190227
  • 20190306
  • 20190306
  • 20190313
  • 20190320
  • 20190327
  • 20190327
  • 20190327
  • 20190417
  • 20190424
  • 20190501
  • 20190508
  • 20190515
  • 20190529
  • 20190605
  • 20190917
  • 20190917
  • 20190924
  • 20191001
  • 20191001
  • 20191008
  • 20191008
  • 20191015
  • 20191015
  • 20191022
  • 20191022
  • 20191029
  • 20191029
  • 20191105
  • 20191105
  • 20191119
  • 20191119
  • 20191203
  • 20191203
  • 20191210
  • 20191217
  • 20191217
  • 20191224
  • 20191224
Powered by GitBook
On this page

Was this helpful?

20190306

dns&bind

Previous20190306Next20190313

Last updated 6 years ago

Was this helpful?

#yum -y install bind bind-chroot bind-utils

#rpm -ql bind

#systemctl stop firewalld

#systemctl status firewalld

#getenforce Disabled

#systemctl start named

#systemctl status named

#netstat tunlp | grep 53

檢查所有占用53port號的ip

測試內網能不能抓到

#dig @127.0.0.1 www.pchome.com.tw

測試外網

#dig @192.168.0.204 www.google.com.tw

如果要讓外網也能使用的話

#gedit /etc/named.conf

修改

listen-on port 53 {127.0.0.1;}; listen-on port 53 {any;};

/讓內網以外的ip可以使用

allow-query {localhost;}; allow-query {any;};

/讓其他使用者可以使用

#systemctl restart named

再次執行一次 192.168.0.204

#dig @192.168.0.204 www.pchome.com.tw

windows使用者的模式下也能進行

#gedit /etc/named.rfc1912.zones

在最下面增加

#gedit /var/named/named.test

#systemctl restart named

到終端機測試

http://blog.kevinlinul.idv.tw/?p=188blog.kevinlinul.idv.tw
正向解析
反向解析