- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在使用带有 BIND 10.1.2 的 linux CentOS 6.64
我在主 DNS (example.com) 中有一个附加区域 (list.example.com)
绑定(bind)(命名)配置文件/etc/named.conf 包含区域:
zone "list.example.com" IN {
type master;
file "list-example-com.zone";
allow-query { localhost; };
allow-transfer { 127.0.0.1; };
};
区域文件list-example-com.zone如下:
$TTL 86400 ; 1 day
@ IN SOA ns1.example.com. hostmaster.example.com. (
2004032201 ; serial
7200 ; refresh (2 hours)
5400 ; retry (1.5 hours)
1814400 ; expire (3 weeks)
86400 ; minimum (1 day)
)
IN NS ns1.example.com.
;
IN A 192.168.177.22
;
; -----------------------------------------------------------------
49.30.22.66 IN A 127.0.0.3
44.63.20.10 IN A 127.0.0.2
64.42.10.5 IN A 127.0.0.2
14.3.6.8 IN A 127.0.0.3
// AND OTHER 1000S OF RECORDS LIKE THAT!
我们以其中一个重新编码的 IP 为例
IP 44.63.20.10 的“A DNS 查找”将是:
44.63.20.10.list.example.com 将从 DNS 返回 127.0.0.2
好的,现在我想做的是,我不想列出 1000 条 IP 记录,我只想在 named.conf、区域文件或任何其他文件中运行 PHP 文件来执行一些代码并为“A”返回 127.0.0.2 IP 44.63.20.10 的 DNS"
我的文件.php:
<?php
// Just need to get the required IP (44.63.20.10) and the DNS_TYPE of the request (A, TXT,...ect) then:
// Execute some PHP codes to do some stuff (including connect to mysql database..ect)
// If the IP is TRUE, then return: (44.63.20.10 IN DNS_TYPE X)
?>
希望你清楚。
我有自己的 PHP 文件,只需要知道是否可以这样做?如果是,那么如何?有什么想法吗?
谢谢。
最佳答案
您必须使用 BIND 全功能 API,它允许“插件”替换指定区域和来自 BIND 的 BIND 内部数据库功能。
您需要编辑 BIND 源文件和 makefile.in,然后重新构建 BIND,包括您的源文件和头文件。
要从他的 API 开始,找到位于目录 bind-release/lib/dns/include/dns/db.h 中的文件 db.h,其中 bind-release 应该替换为您所在的位置和版本号解压源分发,例如/usr/src/bind/10.1.2
这是一个副本 http://pastebin.com/yTN5Aq03
关于php - 在 DNS 区域 Bind 10 中运行 PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31181272/
我需要为一系列 Linux 容器运行本地 BIND DNS 服务器。假设区域是 example.com 我的基础架构中已经有一个 example.com 域,我想使用我的本地 DNS 服务器覆盖一些记
当“Google Public DNS”免费时,为什么要使用“Google Cloud DNS”? 如何设置 DNS/名称服务器以指向计算引擎: 1. 将您的域注册器(在我的情况下为 GoDaddy.
我有一些主机在 EC2 中按需出现,当它们执行启动它们的服务时,它们会在现有区域下的 Route53 中创建一条 A 记录。 A 记录的格式为:randomid.example.com。所以它不是现有
我目前拥有自己的域名和专用服务器,并且为我的客户提供不同的软件包。我希望能够做的是让他们在我的网站上注册并自动创建一个包,他们可以通过他们的用户名作为子域进行访问,例如 http://youruser
我想知道如何只为一级子域设置通配符 DNS,示例: user.example.com // valid www.user.example.com // invalid 我的 BIND 区域域配
我正在努力将我的域的名称服务器切换到新的 DNS 服务。 将新设置与现有 DNS 设置进行比较的最佳工具是什么。 我尝试使用带有和不带有 @nameserver 的 dig 来确保 DNS 记录在新旧
我是一名长期开发人员,但对 DNS 的经验并不丰富。这是我的问题: 我们的应用程序在 Amazon EC2 上为客户启动服务器。一个客户希望为每台启动的服务器使用自定义 DNS,而不是 AWS 提供的
Closed. This question is off-topic。它当前不接受答案。 想改善这个问题吗? Update the question,所以它是用于堆栈溢出的on-topic。 9年前关
我看到几个提到 DNS 名称(域名)的最大字符串长度为 253 个字符。维基百科似乎指的是这篇旧博文: https://en.wikipedia.org/wiki/Hostname http://bl
这可能是完全不可能实现的,但在我尝试之前,我想我可能会从一位极客那里得到一些建议。 Squid 也会代理 DNS 查询吗?我想转发DNS查询以通过squid并使用squid的DNS错误页面,当然是通过
在我的 Rails 应用程序中,我使用 ruby 库 resolv 进行 nslookup。如果输入像 dgdfgdfgdfg.com 这样的网站,则说明时间太长而无法解决。在某些情况下,例如 2
我正在研究一个带有每 5 秒刷新一次(轮询)的实时仪表板(Angular Web 应用程序)的场景。 API 位于 Azure 流量管理器之后,如果主要区域发生故障,它将故障转移到第二个区域。请记住,
我正在使用 fortify,它显示了攻击者可以在我尝试在 java 应用程序中获取主机名时进行 DNS 欺骗的漏洞。我有一个解决方案,通过匹配正向 DNS 和反向 DNS 条目可以避免这种情况。但它有
我正在尝试使用 cert-manager 为我的 istio-ingress-gateway 订购证书。为此,我在 AKS 上的 kubernetes 集群 (1.13.7) 上安装了 istio (
我正在尝试创建一个家庭自动化系统,它可以在我工作的白天照看我的狗。我在这个项目中的目标是学习一些关于 DNS、文件服务和 RaspberryPi 的知识。 我的硬件设置是这样的: 1 个 Raspbe
我想在一台服务器上创建一个 Web 界面,以管理另一台服务器上的几个 dns 服务器。 如何以编程方式远程管理绑定(bind) dns 服务器? 我想添加/编辑/删除区域。 我看到有 rndc,但它只
我对 TTL 和传播时间的概念有点困惑,我想澄清一些我没有设法在网上找到具体答案的事情。 AFAIK,TTL(生存时间)表示世界各地的服务器更新特定 DNS 的缓存值所需的(最高)时间。 所以...
我正在尝试学习 kubernetes,并且我已成功在裸机上设置集群(1 节点)、部署服务并通过入口公开它。 我尝试实现 traefik,以获取 Lets 加密证书,但我无法使其工作,并且在调试时我注意
我想以编程方式自动更新我的 DNS 多个域。我在 GoDaddy 上运行 BIND 服务器(在 FreeBSD 上)以及主机域和 DNS。我找不到供 GoDaddy 访问和更新他们托管的 DNS 的
我正在尝试记录 DNS“泄漏”,换句话说,我网站的访问者使用的 DNS 服务器。 如何确定网络请求来自哪个 DNS 服务器到我的服务器(即获取 DNS 泄漏)。本站 dnsleaktest.com是吗
我是一名优秀的程序员,十分优秀!