码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 基础与应用教程 0011(DNS解析)

时间:2018-06-08 14:18:57      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:linux   table   loop   内网   list   bsp   rfc   dmi   iptable   

#yum install -y bind
#vi /etc/named.conf
(1)对named.conf文件做如下修改
listen-on port 53 { any; }; #默认修改位any
//listen-on-v6 port 53 { ::1; }; #注释掉本行,用“//”加到行首
allow-query { any; }; #默认修改位any
dnssec-lookaside auto;
:wq #保存退出
#vi named.rfc1912.zones
(1)在named.rfc1912.zones文件内作如下修改
zone "yes.com" IN {
type master;
file "yes.com.zone";
};


zone "94.168.192.in-addr.arpa" IN {
type master;
file "192.168.94.zone";
};
:wq #保存退出
#cp /var/named/named.localhost /var/named/yes.com.zone
#cp /var/named/named.loopback /var/named/192.168.94.zone
#vi /var/named/yes.com.zone
(1)对yes.com.zone做如下修改
@ IN SOA ns.yes.com admin.yes.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns
IN AAAA ::1
www IN A 192.168.94.128
zs IN A 192.168.94.129
:wq #保存退出
#vi 192.168.94.zone
(1)对192.168.94.zone做如下修改
$TTL 1D
@ IN SOA yes.com admin.yes.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
7 IN PTR www.yes.com
7 IN PTR zs.yes.com

#service iptables stop
#service named restart
#chmod 755 /var/named/*
#vi /etc/resolv.conf
把最后一行修改为nameserver 192.168.94.128
#ping www.yes.com
#ping zs.yes.com

 

 

学院内网访问教务系统:  http://192.168.100.224:8084/loginAction.do

 

Linux 基础与应用教程 0011(DNS解析)

标签:linux   table   loop   内网   list   bsp   rfc   dmi   iptable   

原文地址:https://www.cnblogs.com/mawenqi-barry/p/9154728.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!