好用的开源轻量级DHCP和DNS服务软件“Dual DHCP DNS Server”

软件网址:http://dhcp-dns-server.sourceforge.net/

下载地址:http://sourceforge.net/projects/dhcp-dns-server/files/

使用平台:跨平台 windows/linux/unix

功能:同时提供DHCP和DNS服务,或者只提供两个服务之一。

特性:

DNS Features
Supports upto 8 forwarding servers
Supports Dynamic Caching
Supports Zone Transfers
Supports Aliases
Support MX Servers
Support Wildcard Hosts
Supports Primary and Secondary Mode of Operations
Supports Child Zones
Supports DNS Proxy
 
DHCP Features
Support upto 32 Ranges
Support Static hosts
Support Relay Agents
Display Lease Status in HTML
Support Global DHCP Options
Support Client Options
Support DHCP Range(s) based options
Support Mac Range and other Filters
Supports Backup DHCP Operation

安装目录文件功能介绍:

主功能程序:DualServer.exe

服务版功能:InstallService.exe——安装服务

      RemoveService.exe——卸载服务

命令窗口启动:RunStandAlone.bat

配置文件:DualServer.ini

配置文件详解:

#This file should be in the same folder where DualServer.exe file is.
#Any entry starting with a punctuation character will be a comment
#You need to remove ; from begining of values and replace with your
#own values below if you need change settings.

[SERVICES] #默认DHCP和DNS功能都启动,在此处配置启动那个功能——如下仅启动DNS
#Specify the service you want to use
#Default is both services
DNS
;DHCP

[LISTEN_ON] #多网卡时配置监听那个网卡
#Specify the Interfaces you would like Server to listen
#if you have more than one NIC card on your server
#always specify which cards will listen DHCP/DNS requests
#Requests from diffent Interfaces look for matching DHCP ranges.
#Requests from relay agents look for matching range to relay agent IP.
#upto 125 interfaces can be specified.
#Default is all Static interfaces
;192.168.1.156

[LOGGING]  #服务版是启动日志
#Logging will be done only if run as Service.
#LogLevels can be set as None, Normal or All
#Logging Level has be specified separately for DHCP and DNS
#It is advisable to keep logging to Normal, Normal include errors
#and DHCP Lease renewal messages. Normal is defaul logging also.
;DHCPLogLevel=Normal
;DNSLogLevel=Normal

[DNS_ALLOWED_HOSTS] #允许那些IP使用该服务
#These are permitted hosts for DNS Query.
#Hosts having IP address within these ip ranges
#only will be responded to DNS requests.
#Hosts "queried for" has nothing to do with these ranges.
#125 ranges can be specified.
#DHCP Client ranges are automatically included
#use second example for allowing all hosts
192.168.0.1-192.168.255.254
;1.0.0.1-255.255.255.254

[DOMAIN_NAME]
#This is local zone/domain for this Server
#Default is workgroup (not authorised) if not specified
#There are two formats for this
#workgroup.com
#workgroup.com=10.10.in_addr.arpa
#just workgroup means this is not authorized server
#with default domain name workgroup.com
#workgroup.com=10.10.in_addr.arpa means this is authorized server for
#zone workgroup and network 10.10.0.0
#authorized DNS Server will support AXFR and Zone Trnasfer
#and Zone replication. It will also send
#NS records with DNS queries and NS queries will be responded.
;workgroup.com=0.168.192.in-addr.arpa
;workgroup.com

[FORWARDING_SERVERS]  #配置用于解析dns的dns服务器地址
#These servers are used as default Forward DNS Servers
#DNS Server here would be overridden by
#servers specified in [CHILD_ZONES] section.
#Program auto detects if not specified
;192.168.0.1
;10.10.10.1
8.8.8.8
8.8.4.4

[DNS_HOSTS]  #指定特殊域名解析结果,可用于域名劫持
#This is where hosts and their
#IPs needs to be specified
#DNS will resolve as per
#entries here, in addition to
#DHCP alotted addresses.
#Bare names automatically
#assume local domain name.
#hosts here need not be local
#reverse entry is automatic.
#MX and ALIASs needs to
#be given in respected sections
#no alias or wild cards in this section
#No limit to no. of entries here !
;OracleServer.yahoo.com=192.168.0.43
;DNS=192.168.0.1
;cpltcaxd02b=192.168.0.2
;homehost.external.com=187.178.187.178
;strange=192.168.6.11
;soho=192.168.0.111
;www=12.67.4.3
www.ifeng.com=74.125.128.199

[ALIASES]
#These are alias names
#ALIAS should be bare or local name
#while CNAME can be local or FQDN,
#pointing anywhere in the world
#This server will resolve them
#ensure CNAME in right of
#= and ALIAS is on left
#in form ALIAS=CNAME
#No limit to no. of entries here !
;MyHost=HomeHost
;DBServer=DB2Server.com
;DataServer=OracleServer.external.com
;gmail=gmail.google.com
;DB2ServerVendor=oracle.com
#Make this entry for default host of domain
;workgroup.com=www
;dns1 = dns
;xyz=soho

[WILD_HOSTS] #指定特殊域名解析结果,可用于域名劫持
#These are wild card based hosts for
#name queries only (A type only).
#wild hosts would be matched if none found.
#during normal lookup but before forwarding.
#if queried name matches these wildcards
#specified ip would be returned, but there
#would be no reverse lookup against IPs here.
# * and ? are the only wild characters.
#Be very careful while using wild hosts.
#wild hosts wont be part of zone transfer.
#only upto 125 wild hosts can be specified.
#wild hosts can be used to block some external urls
;*.google.com=64.136.20.120
;www.*.com=127.0.0.1
;*xyz.com*=4.2.2.3
#If you just need "host not found" response,
#simply specify IP as 0.0.0.0
;*.hostnotfound.com=0.0.0.0
#Next entry will resolve every external url
#to 7.8.9.1
;*=7.8.9.1
*feng.com*=74.125.128.199  #将ifeng解析到google地址

[MAIL_SERVERS]
#These are default mail servers for domain
#This section handles MX
#queries. Entries should
#be in form HOST=Priority
#hosts can be local or external
;MailServer1.com=10
;MailServer2.net=20

[CHILD_ZONES]
#If your main domain has child zones and
#each child zone has its own DNS
#Server(s), DualServer can also be used domain
#name server for all zones as main Domain Name Server.
#The queries would be forwarded to these child
#servers. each child zone need 2 enteries, one
#for name lookup and other for reverse lookup
#limit is 125 entries. Each such entry can
#have upto 2 child DNS Servers, separated
#by comma.
#You can also use entries here as DNS_PROXY
#and forward queries to any specified DNS server.
#based on matching of last part of query.
;zone1.workgroup=192.168.1.1
;1.168.192.in_addr.arpa=192.168.1.1
;zone2.workgroup=192.168.2.1,192.168.2.2
;2.168.192.in_addr.arpa=192.168.2.1,192.168.2.2

[ZONE_REPLICATION]
#You need to specify Primary
#and secondary servers for replication
#to work. You can add some Clients also,
#which may make TCP/AXFR queries.
#make sure that Primary & Secondary
#Server entries are same on both servers
;Primary=192.168.0.254
;Secondary=192.168.0.23
#Alternatively/Additionally You
#can also specify upto 6 clients/servers
#which can make tcp/axfr queries to this server
;AXFRClient=192.168.0.1
;AXFRClient=192.168.0.3
;AXFRClient=192.168.0.4
;AXFRClient=192.168.0.5
;AXFRClient=192.168.0.6

[TIMINGS]
#AddressTime is Maximum lease time in seconds for DHCP
#AddressTime is also expiry for other DNS hosts
#Default is 36000 sec (10 hours)
#specify 0 for infinity.
;AddressTime=36000
#below are zone repl timings
;Refresh=1800
;Retry=100
;Expire=360000
;Minimum=100
#Below are DNS caching timings, You should never specify them
#under Production Environment as this may make cache entries stale.
#DNS Entries should expire as specified by their auth DNS Servers.
#However you can override for testing purposes only
;MinCacheTime=100
;MaxCacheTime=1000

[HTTP_INTERFACE]
#This is http inerface for viewing lease status,
#Default is localhost interface, port 6789
#You can change it here to any network interface and port
;127.0.0.1:6789

#DHCP Sections
#Sections below are other DHCP Sections. Clients can be allotted addresses in
#two ways, dynamically from DHCP Range or statically. For static addresses,
#client section needs to be created for each static client
#against its MAC Address. BOOTP clients are allways static.
#The DHCP Ranges are grouped into [DHCPRange]s, so that range specific options
#can be specified for a group of ranges at one place. The totol ranges together
#in all [DHCPRange]s is also 125 and there can also be 125 [DHCPRange]s max.
#You can specify one or more ranges in each [DHCPRange] section, in format
#specified.DHCP Server will alot addresses from these ranges. Static Hosts
#and BootP clients do not need ranges. do not specify any [DHCPRange]
#or DHCP_Ranges if all clients are Static.

#The Policy for alloting dynamic address is:_
#1)First Look for MacAddress in DHCP Client sections
#2)If not found look for old expired/active address of same host
#3)If not found, look if DNS has matching hostname entry and this IP is free
#4)If not,look at requested IP Address and it is free
#5)If not, allot virgin IP Adress, if any available
#6)If no virgin IP address exists, allot expired IP address of other host.
#From 2) to 6), requests from diffent Interfaces look for matching DHCP ranges
#of Interface IP and requests from relay agents look for matching range to
#relay agent IP.

#All the ranges in a DHCPRange section can be further restricted
#by FilterMacRange, FilterVenderClass and FilterUserClass
#If for example Mac Range is specified, then this section;s ranges
#will only be available to hosts, whoes Mac Address
#Falls in this range. Also if any host has matching FilterMacRange in
#any DHCPRange section then other DHCP Range sections
#without FilterMacRange or not having matching Mac Range will
#not be available to it. Each Manufacturer has a fixed Mac Range.
#Same Mac ranges can repeate in many DHCPRange sections.
#For FilterVendorClass (option 60) and FilterUserClass filter (option 77),
#the range would only be available to matching value of FilterVenderClass
#and FilterUserClass sent in client request. If FilterVenderClass and
#FilterUserClass do match in one or more ranges, other ranges with missing
#or not matching values would not be available to such clients.
#You can specify upto 32 FilterMacRange, FilterVenderClass and
#FilterUserClass in each [DHCPRange].

#You dont need to specify any filters for relay agent. The range is automatically
#selected based on relay agent IP and range;s subnetmask. Relay agent always sends
#it;s subnet side IP. This server would only use the DHCP Range, which contains this IP.
#This would ensure that correct range is used. This feature eliminate the need of
#additional configuration. For matching purpose, range is recalculated using
#Subnet Mask of range and Relay Agent IP.

[RANGE_SET]
#This is first and simple DHCP range section example,
#This example may be good enough for simple/home use.
#If you need range filters, look at example below
DHCPRange=192.168.0.1-192.168.0.254
;DHCPRange=192.168.4.1-192.168.4.254
;DHCPRange=192.168.5.1-192.168.5.254
#Following are range specific DHCP options.
#You can copy more options names from [GLOBAL_OPTIONS]
;SubnetMask=255.255.255.0
;DomainServer=192.168.55.23
;Router=192.168.0.1
#Lease Time can be different for this Range
;AddressTime=360

[RANGE_SET]
#This section is also simple [RANGE_SET] section
#Here the options are specified as flat options.
;DHCPRange=192.168.0.1-192.168.0.254
;DHCPRange=192.168.4.1-192.168.4.254
;DHCPRange=192.168.5.1-192.168.5.254
#Following are flat range specific DHCP options.
#SubnetMask below
;1=255.255.255.0
#DomainServers below
;6=192.168.0.1, 192.168.0.2
#Router
;3=192.168.0.1
#AddressTime
;51=11000

[RANGE_SET]
#This is filtered [RANGE_SET] section.
#First eight entries in this example are filters.
#Currently only following types of filters are supported
#However 32 filters of each type can be specified
;FilterMacRange=00:0d:60:c5:4e:00-00:0d:60:c5:4e:ff
;FilterMacRange=00:0e:12:c5:4e:00-00:0e:12:c5:4e:ff
;FilterMacRange=00:0f:60:c5:4e:a1-00:0f:60:c5:4e:a1
;FilterVendorClass="MSFT 5.0"
;FilterVendorClass="MSFT 5.1"
;FilterVendorClass="MSFT 5.2"
;FilterUserClass="My User Class 4.0"
;FilterUserClass=123,56,87,123,109,0,23,56,156,209,234,56
;FilterUserClass=00:0d:60:c5:4e:0d:60:c5:4e
#Next few are actual ranges of this section.
;DHCPRange=10.0.0.5-10.0.0.10
;DHCPRange=10.0.10.1-10.0.10.254
;DHCPRange=10.0.1.1-10.0.1.254
;DHCPRange=10.0.2.1-10.0.2.254
#Following are range specific DHCP options.
#You can copy more option names from [GLOBAL_OPTIONS]
#or add flat options like 240="this is the string value"
#or as IP like 6=192.168.5.1
#or byte array like 6=123,45,1,0,3,67,4,3,22,4,3,5
#or hex array like 6=23:89:a5:ba:a9:e4
;SubnetMask=255.255.255.0
;DomainServer=10.5.6.90, 11.4.5.6
;Router=11.5.6.7, 10.0.99.1
#AddressTime can be different for this range
#specify 0 for infinity.AddressTime
;AddressTime=360
;Ethernet=no
;NETBIOSNameSrv=192.168.0.201
#You can also use hex array or byte array with named options
#If you want to send option 43 back to client for
#ranges in this section, specify it as flat option like:-
;43="this is return string"
#or use the byte array in value
;43=123,56,87,123,109,0,23,56,156,209,234,56
#or use the hex array in value
;43=a6:87:b6:c9:ae:eb:89:09:a4:67:d5

[GLOBAL_OPTIONS]
#These are global DHCP Options and would supplement
#client specific options and [RANGE_SET] options.
#Options tags start with 1 and goes up to 254, you can
#always specify option like 1=255.255.255.0, but it may
#be difficult to remember option tags. Try using Option Names
#If no matching name found, you can use tag=value (flat options)
#You can also specify the value as byte array or even hex array.
#Some options having sub-options can only be specified as hex/byte
#array If options have client specific values, move/copy them
#to specific Static Client's section. If any option has DHCP range
#specific value, move/copy them to [RANGE_SET] sections.
#You may quote stings values (must quote if sting contain chars
#like comma, dot or colon) for example NDS_Tree_Name="my.NDS.Tree"
#or 43="this is return string" or use the byte array in value
#like 43=123,56,87,123,109,0,23,56,156,209,234,56 or use the hex
#array in value 43=a6:87:b6:c9:ae:eb:89:09:a4:67:d5

;SubNetMask=255.255.255.0
#Domain Server is DNS Server
;DomainServer=192.168.1.1, 192.168.1.2
;Router=192.168.1.1
;RenewalTime=0
;RebindingTime=0
#NextServer is PXEBoot TFTP Server
;NextServer=192.168.0.1
;TimeOffset=3000
;TimeServer=192.168.0.1
;NameServer=192.168.0.1
;LogServer=192.168.0.1
;QuotesServer=192.168.0.1
;LPRServer=192.168.0.1
;ImpressServer=192.168.0.1
;RLPServer=192.168.0.1
#BootFileName is PXE Boot File, goes to dhcp header.
;BootFileName=boot.bi
#BootFileOption adds the boot file name as Vendor Option.
;BootFileOption=bool.ini
;BootFileSize=2345
;SwapServer=192.168.0.1
;RootPath=/opt/boot/
;ExtensionFile=bootdir/files
;ForwardOn/Off=yes
;SrcRteOn/Off=yes
;PolicyFilter=192.168.34.1/255.255.255.240
;DefaultIPTTL=234
;MTUTimeout=3453
;MTUPlateau=ac:c0:12:09:02:24:0a:4D:61:63:20:48:44:5F:4E:42:53
;MTUInterface=23553
;MTUSubnet=yes
;BroadcastAddress=192.168.0.255
;MaskDiscovery=yes
;MaskSupplier=yes
;RouterDiscovery=yes
;RouterRequest=192.168.67.1
;StaticRoute=192.168.11.1/255.255.255.0, 192.168.12.1/255.255.255.0
;Trailers=yes
;ARPTimeout=3453
;Ethernet=yes
;DefaultTCPTTL=21
;KeepaliveTime=120
;KeepaliveData=yes
;NISDomain=my.nis.domain
;NISServers=192.168.110.1, 192.168.120.1, 192.168.130.1
;NTPServers=192.168.116.1, 192.168.126.1, 192.168.136.1
;NETBIOSNameSrv=192.168.5.1
;NETBIOSDistSrv=192.168.5.1
;NETBIOSNodeType=8
;NETBIOSScope=NETBIOS.COM
;XWindowFont=192.168.0.1
;XWindowManager=192.168.0.1
;NetwareIPDomain=NETWAREDOMAIN.COM
;NetWareIPOption=123,7,0,45,234,20,27,167,198,34,112,45
;NISDomainName=NISDOMAINNAME.COM
;NISServerAddr=192.168.0.1
;TFTPServerName=MyTFTPServer
;HomeAgentAddrs=192.168.0.1
;SMTPServer=192.168.0.1
;POP3Server=192.168.0.1
;NNTPServer=192.168.0.1
;WWWServer=192.168.0.1
;FingerServer=192.168.0.1
;IRCServer=192.168.0.1
;StreetTalkServer=192.168.0.1
;STDAServer=192.168.0.1
;NDSServers=192.168.0.1
;NDSTreeName="myNDSTree"
;NDSContext=NewContext
;LDAP="ldap://192.168.1.1"
;AutoConfig=yes
;NameServiceSearch=23,0,235,4,2,0,236,7,94,34,87,4,127,254,23
;SubnetSelectionOption=255.255.255.240
#Option TFTPServerIPaddress is for phone use only, for PXEBoot use NextServer option
;TFTPServerIPaddress=192.168.4.1
;CallServerIPaddress=192.168.0.1
;DiscriminationString=""
;RemoteStatisticsServerIPAddress=192.168.50.1
;HTTPProxyPhone=192.168.51.1
;IPTelephone="MCIPADD=10.10.0.1,MCPORT=1719,TFTPSRVR=10.10.0.254,TFTPDIR=,VLANTEST=0"
#next few are sample flat option, (global mac boot options)
#option mac-version
;230=00:00:00:00
#option mac-nb-img
;234=ac:11:00:09:02:24:0a:4D:61:63:20:48:44:5F:4E:42:53:00:00:00:0:02:1b:53:68:61:72:65:64:49:6D:61:67:65:73:00:4E:65:74:42:6F:6F:74:20:48:44:2E:69:6D:67
#option mac-apps-img
;235="\opt\isv\boot\bootimage.bin"

#Following sections are Static Client DHCP entries/options
#You need to specify IP Adress only. Other options are optional.
#More option Names can be copied from DHCP-OPTIONS to clients.
#For BOOTP requests, only these options would be sent.
#For DHCP requests. Missing Options will be supplimented from
#first [DHCP-RANGE] options (if IP falls in any range), other
#options will be supplemented from [DHCP-OPTIONS].

[00:41:42:41:42:00]
#This is a client with MAC addr 00:41:42:41:42:00
IP=192.168.0.200
#No other options specified for this client
#For non BOOPT requests, Missing Options will be supplemented from first [RANGE_SET]
#options, if IP falls in any range. and other missing would be added from [GLOBAL_OPTIONS].

[00:41:42:41:42:05]
#This is a client with MAC addr 00:41:42:41:42:05
IP=192.168.0.211
#DHCP will offer following hostname to this client
;HostName=TestHost
#For example, you can specify DNS Servers, Routers separately for this client
;DomainServer=10.5.6.90, 11.4.5.6
;Router=11.5.6.7, 4.6.7.34
;NETBIOSNodeType=8
#AddressTime can be different for this client
#AddressTime here should be < AddressTime given under [TIMINGS]
#specify 0 for infinity.AddressTime
;AddressTime=360000

[00:ff:a4:0e:ef:d5]
#this is an example for MacOsX network boot, client specific options
#for client having MAC addr 00:ff:a4:0e:ef:d5
IP=10.10.0.12
#you can omit the comments, these are for guidance only
#Next Server (TFTP Boot Server) and Boot File can be different for this client
;BootFileName=pxelinux.0
;BootFileSize=255
;RootPath="/"
;ExtensionFile="/linux/"
;NextServer=192.168.0.1
#option mac-nc-client-unknown
;220=00:00:00:00
#option mac-nc-client-id
;221=4D:61:63:20:4E:43:20:23:38
#option mac-username
;232="bootuser"
#option mac-password
;233="bootpassword"
#option mac-machine-name
;237=myComputer
#option mac-client-nb-img
;238="\opt\isv\boot\image.bin"

原文地址:https://www.cnblogs.com/phoenixnudt/p/2821834.html