Ubuntu DNS bind9 配置
下面的配置就是实现解析test.zp.com到不同的IP地址
安装dns server软件包
$ apt-get install bind9
配置dns
配置文件的路径在/etc/bind路径下面
添加一个zone
$ /etc/bind# vim /etc/bind/named.conf.local
添加下面,语法可以参照/etc/bind/zones.rfc1918中的语法添加,如下:
zone "zp.com" { type master; file "/etc/bind/db.zp.com"; };
修改db的配置文件
$ /etc/bind# cp db.local db.zp.com
$ /etc/bind# vim db.zp.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA zp.com. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
@ IN A 127.0.0.1
@ IN AAAA ::1
test IN A 192.168.0.11
test IN A 192.168.0.12
test IN A 192.168.0.13
test IN A 192.168.0.14
test IN A 192.168.0.15
test IN A 192.168.0.16
修改/etc/bind/named.conf.option 配置文件,在 named.conf 中可以设置 bind 的 round-robin 的给出结果的顺序:
rrset-order { order cyclic; };
rrset-order 支持三个参数:fixed, random, cyclic 。
fixed 会将多个A记录按配置文件的顺序固定给出
random 会随机给出
cyclic 会循环给出
重启服务
$ /etc/bind# /etc/init.d/bind9 restart
检查配置效果
修改域名解析配置文件
$ /etc/bind# vim /etc/resolv.conf
nameserver 192.168.0.***
添加你的域名服务器的IP地址
$ dig test.zp.com
更加简单的选择 dnsmasq
Ubuntu DNS bind9 配置的更多相关文章
- 配置Ubuntu DNS
首先,你可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.要访问Ubuntu DNS 服务器来进行查询,需要设置/etc/resolv.conf文件 ...
- [Ubuntu] Ubuntu DNS服务器配置
服务器IP:10.68.19.61 操作系统:Ubuntu 13.04 DNS程序:Bind9 测试域名:mycloud.com 目标IP:10.68.19.134 配置步骤 1.安装BIND9程序包 ...
- Ubuntu14.04 bind9配置
apt-get install bind9 配置域名: cn.archive.ubuntu.com 对应IP: 10.60.233.244 vim /etc/bind/name.conf.defaul ...
- 修改ubuntu DNS的步骤/wget url报错: unable to resolve host address的解决方法
wget url 报错:unable to resolve host address ‘url’,显然是无法解析主机地址,这就能看出是DNS解析的问题.解决办法就是配置可用的dns 一般是修改成为谷歌 ...
- [转]ubuntu server上网配置
[转]ubuntu server上网配置 http://blog.sina.com.cn/s/blog_6c9d65a101011pyt.html 今天我的ubuntu server上不去网了,所以重 ...
- Linux系统下DNS主从配置详解
一.DNS概述DNS(Domain Name System),即域名系统.因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串. ...
- Ubuntu server 网络配置中遇到的问题
Ubuntu server 网络配置中遇到的问题 图片中ip地址有可能和文字不符,请不要在意太多,知道原理即可 - 1.首先就是要配置ip地址 vim /etc/network/interfaces ...
- Ubuntu 18.04 配置
Ubuntu 18.04 配置IP-静态(UB与其他linux os不同) sudo netplan generate sudo vim /etc/netplan/50-cloud-init.yaml ...
- ubuntu命令行配置静态IP
(1)首先我们使用ifconfig命令查询一下网卡名称 提示:如果提示没有ifconfig命令,首先应该下载一个net-tools 仅需执行命令:apt install net-tools (2)编辑 ...
随机推荐
- mongo 初级使用
1.找到mongo所在地址 cd /usr/bin 2.进入mongo 命令:mongo mongo:端口(默认27017) ps:我用的是30005 3.选择使用的database 命令:use 自 ...
- Faster-R-CNN编译使用及相应问题解决
1.首先opencv是需要安装的,我用的ubuntu14.04,opencv3.0,具体安装教程可以参考网上很多,不想多提. 2.安装几个依赖包:cython,python-opencv和easydi ...
- android使用shape做selector按钮按下和弹起的动画
平时效果: 按下效果: selector代码: <?xml version="1.0" encoding="utf-8"?> <selec ...
- Android 边框圆角
RelativeLayout 圆角实现: drawable目录下面定义shape的xml文件: mall_header_rel_bg.xml <?xml version="1.0&q ...
- 一些Wifi破解姿势
wlan0:无线网卡设备 BSSID/AP's MAC:目标路由器的mac地址 Client's MAC:连接到此wifi客户端的mac地址 ESSID:这个无线的名字 大致思路: 获取bssid和e ...
- GlusterFS无法启动原因及处理方案
启动结果: Redirecting to /bin/systemctl status glusterd.serviceglusterd.service - GlusterFS, a clustere ...
- Linux压缩与解压缩
.tar.gz 和 .tgz解压:tar zxvf FileName.tar.gz [-C Dir] 中括号中的内容可以省略.压缩:tar zcvf FileName.tar.gz DirName . ...
- LeetCode OJ 63. Unique Paths II
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How m ...
- oracle 11g高级 安装图解(摘自网络)
使用的高级安装 启动OUI后出现“选择安装方式”窗口,我们选择:高级安装 步骤3:出现“选择安装类型”窗口,选择我们需要安装的版本.我们在此肯定是选择企业版. 至于产品语言不用选择,它会根据当前系统的 ...
- 创建UIView对象
创建一个UIView对象分四步: 1.创建一个view对象,并设置其大小 UIView *view = [[UIView alloc] initWithFrame:CGRectMake:(CGFloa ...