5

我已经在 Windows 7 机器上安装了 maradns,我已经配置了它,它可以处理内部请求,但不能处理外部请求

文件

ipv4_bind_addresses = "127.0.0.1"
timestamp_type = 2
random_seed_file = "secret.txt"

csv2 = {}
csv2["myapp.com."] = "db.lan.txt"

upstream_servers = {} # Initialize dictionary variable
upstream_servers["."] = "8.8.8.8, 8.8.4.4"

db.lan.txt

private.%       192.168.1.21 ~
blog.%          192.168.1.16 ~

对于外部请求,它给了我以下错误

C:\Program Files\maradns-2-0-06-win32>askmara.exe Agoogle.com.
# Querying the server with the IP 127.0.0.1
# Remote server said: REFUSED
# NS replies:
# AR replies:

对于内部请求,它的工作正常如下

C:\Program Files\maradns-2-0-06-win32>askmara.exe Aprivate.myapp.com.
# Querying the server with the IP 127.0.0.1
# Question: Aprivate.myapp.com.
private.myapp.com. +86400 a 192.168.1.21
# NS replies:
#myapp.com. +86400 ns synth-ip-7f000001.myapp.com.
# AR replies:
#synth-ip-7f000001.myapp.com. +86400 a 127.0.0.1

当我启动服务器时,我也会收到带有警告的提示

在此处输入图像描述

如何解决这个问题。

4

2 回答 2

7

我有同样的问题..通过用版本 1.4 替换最新版本来修复它.. 之后我唯一做的就是运行 mkSecretTxt.exe 来创建 secret.txt 文件并像这样配置 mararc 文件:

这是我当前的 mararc 文件:

# Win32-specific MaraRC file; this makes a basic recursive DNS
# server.

hide_disclaimer = "YES"
ipv4_bind_addresses = "127.0.0.1"
recursive_acl = "127.0.0.1/8"
timestamp_type = 2

csv2 = {}
csv2["local.com."] = "db.lan.txt"

# This is insecure until the secret.txt file is edited
random_seed_file = "secret.txt"

upstream_servers = {}
upstream_servers["."] = "208.67.222.222,208.67.220.220"

db.lan.txt

% 192.168.1.33 ~

如您所见,我使用了 openDNS 服务器,如果您仍然遇到错误,请尝试它们。 http://www.opendns.com/support/article/105

干杯

于 2013-04-04T17:37:29.357 回答
4

对于跟随此的任何人,似乎 MaraDNS > 2.0 的当前解决方案是将 MaraDNS 与包含的 Deadwood 递归服务器结合使用,以便能够处理本地和外部解析。我能够使用以下配置在我的 Windows 10 机器上运行它...

假设 Windows 机器的 IP 地址是192.168.1.2

在 MaraDNSmararc文件中:

ipv4_bind_addresses = "127.0.0.1"
timestamp_type = 2
random_seed_file = "secret.txt"

csv2 = {}
csv2["mylocalnet.com."] = "db.lan.txt"

db.lan.txt文件中:

% 192.168.1.XXX ~

在 Deadwooddwood3rc.txt配置文件中:

upstream_servers = {}
upstream_servers["."]="8.8.8.8, 8.8.4.4"
upstream_servers["mylocalnet.com."]="127.0.0.1"

bind_address="192.168.1.2"

recursive_acl = "127.0.0.1/16, 192.168.1.1/24"

# By default, for security reasons, Deadwood does not allow IPs in the
# 192.168.x.x, 172.[16-31].x.x, 10.x.x.x, 127.x.x.x, 169.254.x.x,
# 224.x.x.x, or 0.0.x.x range.  If using Deadwood to resolve names
# on an internal network, uncomment the following line:
filter_rfc1918 = 0

您可能会设置多台机器作为独立服务器,但我上面的配置特别之处在于使我能够在同一台机器上运行两台服务器。您可以在 Deadwood 配置中看到,我使用 Google 的 DNS 服务器来处理所有上游请求,但mylocalnet.com.转发到 localhost 并由 MaraDNS 处理的请求除外。

从这里,您只需要启动这两个程序并将 DNS 指向192.168.1.2. 去应该不错!

于 2017-07-18T16:15:48.723 回答