Previous | Linux Wireless Access Point HOWTO |
Next |
[root@accesspoint root]# rndc-confgen -a -c /etc/rndc.key |
// Example named.conf file
// // Set default directory. // Allow queries from the entire wireless network. // Both of the IP addresses given in the section "forwarders" should be set to the DNS // servers of your ISP. // Set preference for DNS responses from the wireless network. options {       directory "/var/named";       allow-query { 10.0.0.0/8; localhost; };       allow-recursion { 10.0.0.0/8; localhost; };       forward first;       forwarders {            0.0.0.0;            1.1.1.1;       };       topology {            10/8;       };   }; // Enable RNDC connections from this host. controls {       inet 127.0.0.1 allow { localhost; } keys { rndc_key; }; }; // This is the root servers zone file, already present on this system. zone "." {       type hint;       file "named.ca"; }; // This is the localhost zone file, already present on the system. zone "localhost" IN {       type master;       file "localhost.zone";       allow-update { none; }; }; // This is the reverse zone file for localhost, already present on the system. zone "0.0.127.in-addr.arpa" {       type master;       file "named.local";       allow-update { none; }; }; // This is the zone file for our wireless domain. Edit this entry to reflect your domain. zone "simon.akld.nzwireless.org" {       allow-transfer { 10.0.0.0/8; localhost; };       allow-query { any; };       allow-update { none; };       type master;       file "simon.akld.nzwireless.org"; }; // This is the reverse zone file for our wireless domain. Edit it to reflect the IP network // assigned to you. (note - in reverse! network 10.1.2.0 becomes 2.1.10.in-addr.arpa) zone "2.1.10.in-addr.arpa" {       allow-transfer { 10.0.0.0/8; localhost; };       allow-query { any; };       allow-update { none; };       type master;       file "2.1.10.in-addr.arpa"; }; // A key file needs to be referenced for use by rndc. include "/etc/rndc.key"; |
;
; Example zone file for simon.akld.nzwireless.org ; ; Change "oob.wildstar.net" to your own email address e.g. "someone.yahoo.com" ; $TTL 3D @        IN      SOA     ns.simon.akld.nzwireless.org. oob.wildstar.net. (                       199802151     ; serial, todays date + todays serial #                       8H     ; refresh, seconds                       2H     ; retry, seconds                       4W   ; expire, seconds                       1D )    ; minimum, seconds ;                        NS    accesspoint    ; Inet Address of name server ; localhost        A        127.0.0.1 accesspoint    A        10.1.2.1 ns                   A        10.1.2.1                       TXT        "Simons Wireless Gateway" dhcp-01         A         10.1.2.10 dhcp-02         A         10.1.2.11 dhcp-03         A         10.1.2.12 dhcp-04         A         10.1.2.13 dhcp-05         A         10.1.2.14 dhcp-06         A         10.1.2.15 dhcp-07         A         10.1.2.16 dhcp-08         A         10.1.2.17 dhcp-09         A         10.1.2.18 dhcp-10         A         10.1.2.19 dhcp-11         A         10.1.2.20 |
;Example zone file for 10.1.2.0
; ; Change "oob.wildstar.net." to your own email address e.g. "something.yahoo.com." ; $TTL 3D @        IN       SOA     ns.simon.akld.nzwireless.org. oob.wildstar.net. (                       199802151     ; Serial                       8H     ; Refresh                       2H     ; Retry                      4W     ; Expire                      1D)     ; Minimum TTL ;                       NS          accesspoint.simon.akld.nzwireless.org. 1                   PTR         accesspoint.simon.akld.nzwireless.org. 10                 PTR         dhcp-01.simon.akld.nzwireless.org. 11                 PTR         dhcp-02.simon.akld.nzwireless.org. 12                 PTR         dhcp-03.simon.akld.nzwireless.org. 13                 PTR         dhcp-04.simon.akld.nzwireless.org. 14                 PTR         dhcp-05.simon.akld.nzwireless.org. 15                 PTR         dhcp-06.simon.akld.nzwireless.org. 16                 PTR         dhcp-07.simon.akld.nzwireless.org. 17                 PTR         dhcp-08.simon.akld.nzwireless.org. 18                 PTR         dhcp-09.simon.akld.nzwireless.org. 19                 PTR         dhcp-10.simon.akld.nzwireless.org. 20                 PTR         dhcp-11.simon.akld.nzwireless.org. |
[root@accesspoint root] cat <<END_ENTRY > /etc/resolv.conf
nameserver 127.0.0.1 search simon.akld.nzwireless.org END_ENTRY |
[root@accesspoint root]# service named start |
[root@accesspoint root]# dig dhcp-01.simon.akld.nzwireless.org |
; <<>> DiG 9.2.1 <<>> dhcp-01.simon.akld.nzwireless.org
;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63169 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;dhcp-01.simon.akld.nzwireless.org. IN A ;; ANSWER SECTION: dhcp-01.simon.akld.nzwireless.org. 259200 IN A 10.10.10.10 ;; AUTHORITY SECTION: simon.akld.nzwireless.org. 259200 IN NS accesspoint.simon.akld.nzwireless.org. ;; ADDITIONAL SECTION: accesspoint.simon.akld.nzwireless.org. 259200 IN A 10.10.10.1 ;; Query time: 4 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sun Jan 6 00:51:50 1980 ;; MSG SIZE rcvd: 110 |
[root@accesspoint root]# dig -x 10.1.2.10 |
; <<>> DiG 9.2.1 <<>> -x 10.1.2.10
;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42239 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;10.2.1.10.in-addr.arpa. IN PTR ;; ANSWER SECTION: 10.2.1.10.in-addr.arpa. 259200 IN PTR dhcp-01.akld.nzwireless.org. ;; AUTHORITY SECTION: 2.1.10.in-addr.arpa. 259200 IN NS accesspoint.akld.nzwireless.org. ;; ADDITIONAL SECTION: accesspoint.simon.akld.nzwireless.org. 259200 IN A 10.1.2.1 ;; Query time: 5 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sun Jan 6 01:00:31 1980 ;; MSG SIZE rcvd: 132 |
Previous | Home | Next |