mirror of https://github.com/hak5/openwrt-owl.git
split into bind-server and bind-client package, add startup script and example named.conf
SVN-Revision: 1918owl
parent
6e7cffd315
commit
8ceba94522
|
@ -1,10 +1,25 @@
|
||||||
|
menu "bind - DNS server implementation"
|
||||||
|
|
||||||
config BR2_PACKAGE_BIND
|
config BR2_PACKAGE_BIND
|
||||||
tristate "bind - popular dns server"
|
bool "bind - popular dns server"
|
||||||
default m if CONFIG_DEVEL
|
default y if CONFIG_DEVEL
|
||||||
select BR2_PACKAGE_LIBOPENSSL
|
|
||||||
help
|
help
|
||||||
DNS server implementation
|
DNS server implementation
|
||||||
|
|
||||||
http://www.isc.org/
|
http://www.isc.org/
|
||||||
|
|
||||||
Depends: openssl
|
Depends: openssl
|
||||||
|
|
||||||
|
config BR2_PACKAGE_BIND_SERVER
|
||||||
|
tristate "named - popular dns server"
|
||||||
|
default m if CONFIG_DEVEL
|
||||||
|
select BR2_PACKAGE_LIBOPENSSL
|
||||||
|
depends BR2_PACKAGE_BIND
|
||||||
|
|
||||||
|
config BR2_PACKAGE_BIND_CLIENT
|
||||||
|
tristate "nsupdate - dynamic dns client"
|
||||||
|
default m if CONFIG_DEVEL
|
||||||
|
select BR2_PACKAGE_LIBOPENSSL
|
||||||
|
depends BR2_PACKAGE_BIND
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
|
@ -13,10 +13,12 @@ PKG_CAT:=zcat
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
PKG_INIT_LEVEL:=60
|
||||||
|
|
||||||
include $(TOPDIR)/package/rules.mk
|
include $(TOPDIR)/package/rules.mk
|
||||||
|
|
||||||
$(eval $(call PKG_template,BIND,bind,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
$(eval $(call PKG_template,BIND_SERVER,bind-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_template,BIND_CLIENT,bind-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||||
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||||
|
@ -36,7 +38,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--mandir=/usr/share/man \
|
--mandir=/usr/share/man \
|
||||||
--sbindir=/usr/sbin \
|
--sbindir=/usr/sbin \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc/bind \
|
||||||
--without-openssl \
|
--without-openssl \
|
||||||
--without-ipv6 \
|
--without-ipv6 \
|
||||||
$(DISABLE_LARGEFILE) \
|
$(DISABLE_LARGEFILE) \
|
||||||
|
@ -91,8 +93,17 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
|
||||||
install
|
install
|
||||||
touch $(PKG_BUILD_DIR)/.built
|
touch $(PKG_BUILD_DIR)/.built
|
||||||
|
|
||||||
$(IPKG_BIND):
|
$(IPKG_BIND_SERVER):
|
||||||
install -d -m0755 $(IDIR_BIND)/usr/sbin
|
install -d -m0755 $(IDIR_BIND_SERVER)/usr/sbin
|
||||||
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND)/usr/sbin/
|
install -d -m0755 $(IDIR_BIND_SERVER)/etc/init.d
|
||||||
$(RSTRIP) $(IDIR_BIND)
|
cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND_SERVER)/usr/sbin/
|
||||||
$(IPKG_BUILD) $(IDIR_BIND) $(PACKAGE_DIR)
|
cp -fpR files/bind $(IDIR_BIND_SERVER)/etc
|
||||||
|
cp -fpR files/named.init $(IDIR_BIND_SERVER)/etc/init.d/S$(PKG_INIT_LEVEL)named
|
||||||
|
$(RSTRIP) $(IDIR_BIND_SERVER)
|
||||||
|
$(IPKG_BUILD) $(IDIR_BIND_SERVER) $(PACKAGE_DIR)
|
||||||
|
|
||||||
|
$(IPKG_BIND_CLIENT):
|
||||||
|
install -d -m0755 $(IDIR_BIND_CLIENT)/usr/bin
|
||||||
|
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(IDIR_BIND_CLIENT)/usr/bin/
|
||||||
|
$(RSTRIP) $(IDIR_BIND_CLIENT)
|
||||||
|
$(IPKG_BUILD) $(IDIR_BIND_CLIENT) $(PACKAGE_DIR)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
;
|
||||||
|
; BIND reverse data file for broadcast zone
|
||||||
|
;
|
||||||
|
$TTL 604800
|
||||||
|
@ IN SOA localhost. root.localhost. (
|
||||||
|
1 ; Serial
|
||||||
|
604800 ; Refresh
|
||||||
|
86400 ; Retry
|
||||||
|
2419200 ; Expire
|
||||||
|
604800 ) ; Negative Cache TTL
|
||||||
|
;
|
||||||
|
@ IN NS localhost.
|
|
@ -0,0 +1,13 @@
|
||||||
|
;
|
||||||
|
; BIND reverse data file for local loopback interface
|
||||||
|
;
|
||||||
|
$TTL 604800
|
||||||
|
@ IN SOA localhost. root.localhost. (
|
||||||
|
1 ; Serial
|
||||||
|
604800 ; Refresh
|
||||||
|
86400 ; Retry
|
||||||
|
2419200 ; Expire
|
||||||
|
604800 ) ; Negative Cache TTL
|
||||||
|
;
|
||||||
|
@ IN NS localhost.
|
||||||
|
1.0.0 IN PTR localhost.
|
|
@ -0,0 +1,12 @@
|
||||||
|
;
|
||||||
|
; BIND reverse data file for broadcast zone
|
||||||
|
;
|
||||||
|
$TTL 604800
|
||||||
|
@ IN SOA localhost. root.localhost. (
|
||||||
|
1 ; Serial
|
||||||
|
604800 ; Refresh
|
||||||
|
86400 ; Retry
|
||||||
|
2419200 ; Expire
|
||||||
|
604800 ) ; Negative Cache TTL
|
||||||
|
;
|
||||||
|
@ IN NS localhost.
|
|
@ -0,0 +1,13 @@
|
||||||
|
;
|
||||||
|
; BIND data file for local loopback interface
|
||||||
|
;
|
||||||
|
$TTL 604800
|
||||||
|
@ IN SOA localhost. root.localhost. (
|
||||||
|
1 ; Serial
|
||||||
|
604800 ; Refresh
|
||||||
|
86400 ; Retry
|
||||||
|
2419200 ; Expire
|
||||||
|
604800 ) ; Negative Cache TTL
|
||||||
|
;
|
||||||
|
@ IN NS localhost.
|
||||||
|
@ IN A 127.0.0.1
|
|
@ -0,0 +1,45 @@
|
||||||
|
|
||||||
|
; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
|
||||||
|
;; global options: printcmd
|
||||||
|
;; Got answer:
|
||||||
|
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
|
||||||
|
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
|
||||||
|
|
||||||
|
;; QUESTION SECTION:
|
||||||
|
;. IN NS
|
||||||
|
|
||||||
|
;; ANSWER SECTION:
|
||||||
|
. 518400 IN NS A.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS B.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS C.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS D.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS E.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS F.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS G.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS H.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS I.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS J.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS K.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS L.ROOT-SERVERS.NET.
|
||||||
|
. 518400 IN NS M.ROOT-SERVERS.NET.
|
||||||
|
|
||||||
|
;; ADDITIONAL SECTION:
|
||||||
|
A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
|
||||||
|
B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
|
||||||
|
C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
|
||||||
|
D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
|
||||||
|
E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
|
||||||
|
F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
|
||||||
|
G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
|
||||||
|
H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
|
||||||
|
I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
|
||||||
|
J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
|
||||||
|
K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
|
||||||
|
L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
|
||||||
|
M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
|
||||||
|
|
||||||
|
;; Query time: 81 msec
|
||||||
|
;; SERVER: 198.41.0.4#53(a.root-servers.net.)
|
||||||
|
;; WHEN: Sun Feb 1 11:27:14 2004
|
||||||
|
;; MSG SIZE rcvd: 436
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// This is the primary configuration file for the BIND DNS server named.
|
||||||
|
|
||||||
|
options {
|
||||||
|
directory "/tmp";
|
||||||
|
|
||||||
|
// If your ISP provided one or more IP addresses for stable
|
||||||
|
// nameservers, you probably want to use them as forwarders.
|
||||||
|
// Uncomment the following block, and insert the addresses replacing
|
||||||
|
// the all-0's placeholder.
|
||||||
|
|
||||||
|
// forwarders {
|
||||||
|
// 0.0.0.0;
|
||||||
|
// };
|
||||||
|
|
||||||
|
auth-nxdomain no; # conform to RFC1035
|
||||||
|
};
|
||||||
|
|
||||||
|
// prime the server with knowledge of the root servers
|
||||||
|
zone "." {
|
||||||
|
type hint;
|
||||||
|
file "/etc/bind/db.root";
|
||||||
|
};
|
||||||
|
|
||||||
|
// be authoritative for the localhost forward and reverse zones, and for
|
||||||
|
// broadcast zones as per RFC 1912
|
||||||
|
|
||||||
|
zone "localhost" {
|
||||||
|
type master;
|
||||||
|
file "/etc/bind/db.local";
|
||||||
|
};
|
||||||
|
|
||||||
|
zone "127.in-addr.arpa" {
|
||||||
|
type master;
|
||||||
|
file "/etc/bind/db.127";
|
||||||
|
};
|
||||||
|
|
||||||
|
zone "0.in-addr.arpa" {
|
||||||
|
type master;
|
||||||
|
file "/etc/bind/db.0";
|
||||||
|
};
|
||||||
|
|
||||||
|
zone "255.in-addr.arpa" {
|
||||||
|
type master;
|
||||||
|
file "/etc/bind/db.255";
|
||||||
|
};
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -f /etc/bind/named.conf ]; then
|
||||||
|
named -c /etc/bind/named.conf
|
||||||
|
fi
|
|
@ -0,0 +1,7 @@
|
||||||
|
Package: bind-client
|
||||||
|
Priority: optional
|
||||||
|
Section: net
|
||||||
|
Maintainer: OpenWrt Developer <openwrt-devel@openwrt.org>
|
||||||
|
Source: buildroot internal
|
||||||
|
Description: dynamic dns client
|
||||||
|
Depends: libopenssl
|
|
@ -0,0 +1,6 @@
|
||||||
|
/etc/bind/named.conf.example
|
||||||
|
/etc/bind/db.0
|
||||||
|
/etc/bind/db.127
|
||||||
|
/etc/bind/db.255
|
||||||
|
/etc/bind/db.local
|
||||||
|
/etc/bind/db.root
|
|
@ -1,7 +1,8 @@
|
||||||
Package: bind
|
Package: bind-server
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: net
|
Section: net
|
||||||
Maintainer: Waldemar Brodkorb <wbx@dass-it.de>
|
Maintainer: OpenWrt Developer <openwrt-devel@openwrt.org>
|
||||||
Source: buildroot internal
|
Source: buildroot internal
|
||||||
Description: popular dns server
|
Description: popular dns server
|
||||||
Depends: libopenssl
|
Depends: libopenssl
|
||||||
|
Conflicts: dnsmasq
|
Loading…
Reference in New Issue