DNS中CDN内容分发网络(了解)BIND包

@[toc]

BIND安装

DNS服务器软件:bind,powerdns,unbound
BIND相关程序:yum list all bind*
bind:服务器
bind-libs:相关库
bind-utils:客户端
bind-chroot: /var/named/chroot/

BIND程序名:named

bind服务器

服务脚本和名称:/etc/rc.d/init.d/named /usr/lib/systemd/system/named.service

主配置文件:/etc/named.conf, /etc/named.rfc1912.zones, /etc/rndc.key
解析库文件:/var/named/ZONE_NAME.ZONE
注意
(1) 一台物理服务器可同时为多个区域提供解析
(2) 必须要有根区域文件;named.ca
(3) 应该有两个(如果包括ipv6的,应该更多)实现localhost和本地回环地址的解
析库

rndc:remote name domain controller,
默认与bind安装在同一主机,且只能通过127.0.0.1连接named进程
提供辅助性的管理功能;953/tcp

bind中ACL

bind中基础的安全相关的配置:

acl: 把一个或多个地址归并为一个集合,并通过一个统一的名称调用
格式:
小范围写前面,大范围写后面

acl acl_name {
ip;
net/prelen;
……
};

示例:

acl mynet {
172.16.0.0/16;
10.10.10.10;## CDN (Content Delivery Network)

bind有四个内置的acl:

有人就是bind的配置文件/etc/named.conf中用到的

none 没有一个主机
any 任意主机
localhost 本机
localnet 本机的IP同掩码运算后得到的网络地址

注意:只能先定义后使用;因此一般定义在配置文件中,处于options的前面

访问控制

访问控制的指令:
allow-query {}: 允许查询的主机;白名单
allow-transfer {}:允许区域传送的主机;白名单
allow-recursion {}: 允许递归的主机,建议全局使用
allow-update {}: 允许更新区域数据库中的内容

CDN

基本原理:在用户访问网站时,利用GSLB全局负载技术将用户的访问指向距离最近的dns缓存服务器上,由缓存服务器直接响应用户请求

简单的说CDN就是让原本上海的浏览器要访问北京主站内容的请求转而由部署在上海或南京的缓存来受理,这样请求的数据只需经过一跳或有限的几跳就能到达请求端,有效利用带宽并且降低主站压力,对于电子商务网站和搜索引擎网站以及门户网站,CDN的合理应用显得尤为重要。

内容分发网络
在这里插入图片描述

GSLB

GSLB:Global Server Load Balance全局负载均衡

GSLB是对服务器和链路进行综合判断来决定由哪个地点的服务器来提供服务,实现异地服务器群服务质量的保证

GSLB主要的目的是在整个网络范围内将用户的请求定向到最近的节点(或者区域)

GSLB分为**基于DNS实现、基于重定向实现、基于路由协议实现,**其中最通用的是基于DNS解析方式

GSLB和CDN

在这里插入图片描述

bind view

CDN: Content Delivery Network内容分发网络
服务商:蓝汛,网宿,帝联等
智能DNS:
dnspod
dns.la
view:视图:实现智能DNS
一个bind服务器可定义多个view,每个view中可定义一个或多个zone
每个view用来匹配一组客户端
多个view内可能需要对同一个区域进行解析,但使用不同的区域解析库文件

在这里插入图片描述

实验:两台机实现CDN

智能dns:让用户返回的是离他更近的服务器的地址

在/etc/named.conf中
定义???网络
小范围写前面,大范围写后面

在这里插入图片描述
定义视图
数据库
在/ var/named/
定义三个库
.bj
在这里插入图片描述
在这里插入图片描述
.sh
在这里插入图片描述
.other

在这里插入图片描述
修改view(所有的区域zone信息都必须写到view中)
方法一
在这里插入图片描述
方法二:也可以将区域zone全都放到/etc/named.rfc1912.zones
然后用include "/etc/named.rfc1912.zones";导入
这里注意文件权限

在这里插入图片描述
在这里插入图片描述
最后在配置文件named.conf中配置view

在这里插入图片描述
重启服务就ok

也就是从不同的区域客户端访问,访问地址就不一样

主要步骤:

在/etc/named.conf中
在这里插入图片描述

在这里插入图片描述
定义:三个区域(属性问题)
所属组都为named
在这里插入图片描述

在这里插入图片描述
创建库文件(属性)所属组为named
在这里插入图片描述

在这里插入图片描述

实现浏览器,
一个与,对应多个ip
做两个http网站
在这里插入图片描述
在这里插入图片描述
如果一个宕机-----》就只用另一个好的机器

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DNS解析BIND 9(适用于WINDOWS桌面系统) 完全改进: Security Fixes Treat an all zero netmask as invalid when generating the localnets acl to workaround bug on Windows platform. [CVE-2013-6230] [RT #34687] Fix crashes when serving some NSEC3 signed zones. memcpy was incorrectly called with overlapping ranges, resulting in malformed names being generated on some platforms. This could cause INSIST failures. (CVE 2014-0591) [RT #35120] Features Changes Add the ability to specify ndots to "nslookup". [RT #34711] Introduce a new tool "dnssec-importkey" to allow externally-generated DNSKEY to be imported into the DNSKEY management framework. [RT #34698] Check that EDNS subnet client options are well formed. [RT #34718] "named" now preserves the capitalization of names when responding to queries. [RT #34737] Include a comment in .nzf files (used for adding new zones via "rndc"), giving the name of the associated view. [RT #34765] Use separate rate limiting queues for refresh and notify requests. [RT #30589] Adjust when a master server is deemed unreachable to be less aggressive. [RT #27075] Create delegations for all "children" of empty zones except "forward first". [RT #34826] Changed the name of "isc-config.sh" developers script (for outputting compiler and linker flags) to "bind9-config". [RT #23825] Add "dig" option to keep the TCP socket open between successive queries (+[no]keepopen). [RT #34918] Add dns_client_createx2() function to DNS Client API to provide a way to specify the local address for use when sending update packets. [RT #34811] "named-checkconf -z" now checks zones of type hint as well as master. [RT #35046] Update config.guess and config.sub to add support for ppc64le (powerpc 64-bit Little Endian). [RT #35060] Update the Windows build system to support feature selection and WIN64 builds. This is a work in progress. [RT #34160] Add "dnssec-signzone -Q" switch to drop signatures from keys that are still published but no longer active. [RT #34990] Add a more detailed "not found" message to "rndc" commands which specify a zone name. [RT #35059] named will now warn when a zone's configured "key-directory" does not exist or is not a directory. [RT #35108] Added improvements to statistics channel XSL stylesheet: the stylesheet can now be cached by the browser; section headers are omitted from the stats display when there is no data in those sections to be displayed; counters are now right-justified for easier readability. (Only available with ./configure --enable-newstats.) [RT #35117] "named-checkconf" can now obscure shared secrets when printing by specifying '-x'. [RT #34465] "named" can now accept integer timestamps in RRSIG records. [RT #35185] The export-library API call for loading "resolv.conf", irs_resconf_load(), has been modified to return ISC_R_FILENOTFOUND when the file does not exist and initializes the resconf structure as if the file had existed and configured with nameservers at the localhost addresses (127.0.0.1 and ::1). [RT #35194] Bug Fixes Treat type 65533 (KEYDATA) as opaque except when used in a key zone. [RT #34238] Fix "host" and "nslookup" so don't need dot after the domain by checking ndots when searching. Only continue searching on NXDOMAIN responses. [RT #34711] Handle changes to sig-validity-interval settings better. [RT #34625] Fix bug where journal filename string could be set incorrectly, causing garbage in log messages. [RT #34738] Address a race condition when shutting down a zone. [RT #34750] Address race condition with manual notify requests. [RT #34806] Fix nslookup crash where some readline clones don't accept NULL pointers when calling add_history. [RT #34842] Fix Linux compilation issue when libcap-devel is installed. [RT #34838] Fix installation on Solaris -- don't add explicit make dependencies/rules for python programs as make won't use the implicit rules. [RT #34835] Fix hanging server with inline-signed zones by addressing lock order reversal deadlock with inline zones. [RT #34856] Fix "host" failure if a UDP query timed out. [RT #34870] Address bugs in dns_rdata_fromstruct and dns_rdata_tostruct for WKS and ISDN types. [RT #34910] Updated OpenSSL PKCS#11 patches to fix active list locking and other bugs. [RT #34855] Fix a potential hang with failure to release lock on error in receive_secure_db. #34944] Fix cast in lex.c which could see 0xff treated as EOF. This fixes issue with potential bad data in a database used by DLZ or SDB. [RT #34993] Fix build issue on newer FreeBSD needing -lhx509 for GSSAPI build. [RT #35001] Address read after free in server side of lwres_getrrsetbyname. [RT #29075] Fix "nsupdate" memory leak if "realm" was used multiple times. [RT #35073] Fix "dig" for cleaning up TCP sockets still waiting on connect(). [RT #35074] Fix "dnssec-importkey" so imported key won't overwrite an existing non-imported private key. Fix issue where queries covered by a disabled Response Policy Zone (query type was '*') are answered with TTL of 0. [RT #35026] Fix "nsupdate" memory leak if "realm" was used multiple times. [RT #35073] Fix "dig" for cleaning up TCP sockets still waiting on connect(). [RT #35074] Fix issue with "rndc retransfer" with inline-signing replacing NSEC3 with NSEC records. [RT #34745] Fix issue with "rndc refresh" failing to sign slave zones using inline-signing. [RT #35105] Fix potential hang (detected by our inline-signing system test) with null pointer dereference in libdns zone_xfrdone. [RT #35042] Address bug in libdns loadnode function that could return a freed node on out of memory. [RT #35106] Fixed a bug causing an insecure delegation from one "static-stub" zone to another to fail with a broken trust chain. [RT #35081] Fixed problem where iterative responses could be discarded when the "query-source" port for an upstream query was the same as the listener port (53). [RT #34925] Fix crashes in RBTDB implementation. Two calls to dns_db_getoriginnode were fatal if there was no data at the node. [RT #35080] Fix a possible race and crash in the socket_search() function in dispatch.c. [RT #35107] Fix "dig" so it can handle AXFR style IXFR responses which span multiple messages. [RT #35137] Fix a "host" tool problem with converting UTF-8 textname to IDN encoding by handling "." as a search list element when IDN support is enabled. [RT #35133] Fix "queryperf" to prevent a possible integer overflow when printing results. [RT #35182] Prevent a theoretically possible race and crash when obtaining a socket in dispatch.c [RT #35128] Use built-in versions of strptime() and timegm() on all platforms to avoid portability issues. [RT #35183] Fix a bug which could cause a crash when running "rndc reconfig" or "rndc reload" after configuration is changed from regular zones to automatic empty zones. [RT #35177]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值