Trang chủ » Hướng dẫn kích hoạt BIND trên CentOS 7

Hướng dẫn kích hoạt BIND trên CentOS 7

bởi Vinh Leo
1,9K views
5/5 - (1 bình chọn)

1. Kích hoạt BIND trên CentOS 7

[root@hocmangmaytinh ~]# systemctl start named
[root@hocmangmaytinh ~]# systemctl enable named

2. Nếu đang chạy Firewalld, hãy cho phép dịch vụ DNS Server. BIND sử dụng port 53/TCP, UDP.

[root@hocmangmaytinh ~]# firewall-cmd --add-service=dns --permanent 
success
[root@hocmangmaytinh ~]# firewall-cmd --reload 
success

3. Thay đổi DNS Server

[root@hocmangmaytinh ~]# nmcli c modify eno16777736 ipv4.dns 10.0.0.30
[root@hocmangmaytinh ~]# nmcli c down eno16777736; nmcli c up eno16777736

4. Names và Address được phân giải thành công

[root@hocmangmaytinh ~]# dig demo.hocmangmaytinh.com.
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> demo.hocmangmaytinh.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41735
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;demo.hocmangmaytinh.com.              IN      A

;; ANSWER SECTION:
demo.hocmangmaytinh.com.       86400   IN      A       10.0.0.30

;; AUTHORITY SECTION:
hocmangmaytinh.com.           86400   IN      NS      demo.hocmangmaytinh.com.

;; Query time: 1 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Thu Jul 10 14:43:35 JST 2014
;; MSG SIZE  rcvd: 75
[root@hocmangmaytinh ~]# dig -x 10.0.0.30
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> -x 10.0.0.30
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14268
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;30.0.0.10.in-addr.arpa.                IN      PTR

;; ANSWER SECTION:
30.0.0.10.in-addr.arpa. 86400   IN      PTR     demo.hocmangmaytinh.com.

;; AUTHORITY SECTION:
0.0.10.in-addr.arpa.    86400   IN      NS      demo.hocmangmaytinh.com.

;; ADDITIONAL SECTION:
demo.hocmangmaytinh.com.       86400   IN      A       10.0.0.30

;; Query time: 1 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Thu Jul 10 14:44:39 JST 2014
;; MSG SIZE  rcvd: 111

Chúc các bạn thành công! Mọi thắc mắc, cần hỗ trợ hãy bình luận bên dưới hoặc qua Fanpage Facebook, form liên hệ.

Xem tiếp các bài trong Series Học CentOS 7 căn bản

CÓ THỂ BẠN QUAN TÂM

Subscribe
Thông báo cho
guest
0 Góp ý
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x