如何在Windows 7中使用MaraDNS解析外部域名

时间:2012-11-16 06:59:32

标签: windows-7 dns

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

marac文件

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

当我启动服务器时,我也会收到提示并发出警告

enter image description here

如何解决此问题。

2 个答案:

答案 0 :(得分:5)

我有同样的问题..通过用版本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

欢呼声

答案 1 :(得分:2)

对于任何追随这一点的人来说,似乎是MaraDNS的当前解决方案> 2.0是将MaraDNS与包含的Deadwood递归服务器结合使用,以便能够处理本地和外部分辨率。我能够通过以下配置在我的Windows 10机器上运行...

假设Windows机器的IP地址为192.168.1.2

在MaraDNS mararc文件中:

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 ~

在Deadwood dwood3rc.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即可。应该好好去!