Skip to main content

Classless Reverse DNS with Recursion - BIND

I'm running BIND 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 on
CentOS 6.6. The only zone is for classless reverse DNS, which has been
delegated.




I'm no BIND or DNS expert,
but as I understand it, classless reverse DNS requires recursion.



With recursion set to "any", the server returns
correct PTR records, but also functions as an open DNS server, which is not desired.
With recursion set to localhost, all queries are
denied.



Recursion
any:





64.19.199.56



Server:
slcdns1.redacted.com

Address: 64.19.199.55
Aliases:
55.199.19.64.in-addr.arpa



Non-authoritative
answer:
56.199.19.64.in-addr.arpa canonical name =
56.0-127.199.19.64.in-addr.arpa




56.0-127.199.19.64.in-addr.arpa name =
slcdns2.redacted.com




0-127.199.19.64.in-addr.arpa nameserver = slcdns1.redacted.com

0-127.199.19.64.in-addr.arpa nameserver = slcdns2.redacted.com


slcdns1.redacted.com internet address = 64.19.199.55
slcdns2.redacted.com
internet address =
64.19.199.56




Recursion
localhost:





64.19.199.56



Server:
slcdns1.redacted.com

Address: 64.19.199.55
Aliases:
55.199.19.64.in-addr.arpa



***
slcdns1.redacted.com can't find 56.199.19.64.in-addr.arpa.: Query
refused[/CODE]




Any
thoughts on how I can get this to respond to queries for the reverse zone without
functioning as an open server? Also, is it the correct behavior for the first query to
show as
non-authoritative?



named.conf:
options
{

listen-on port 53 { 10.10.1.55; };
directory
"/var/named";
dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";
memstatistics-file
"/var/named/data/named_mem_stats.txt";
bindkeys-file
"/etc/named.iscdlv.key";
managed-keys-directory
"/var/named/dynamic";
};

logging {


channel default_debug {
file "data/named.run";
severity
debug;
};
};

include
"/etc/named.rfc1912.zones";
include
"/etc/named.root.key";

view "outsiderev"
{

empty-zones-enable no;
allow-recursion { 127.0.0.1;
};
allow-query { none; };
additional-from-auth
no;
additional-from-cache no;

zone
"0-127.199.19.64.in-addr.arpa" {
type master;
file
"/var/named/64.19.199.rev";
allow-update {


10.10.1.56;
};
allow-query {
any;

};
allow-transfer {
10.10.1.56;
};
notify
yes;
};


zone "." IN {
type
hint;
file "named.ca";
};

zone "redacted.com"
{
type master;
file "/var/named/redacted.com.hosts";

allow-update {

10.10.1.56;
};
allow-query
{
any;
};
notify yes;
allow-transfer
{
10.10.1.56;
};

};


zone "0.0.127.in-addr.arpa" {
type
master;
file "/var/named/127.0.0.rev";
allow-update {

none;
};
allow-query {
none;

};

};

zone "localhost" in{
type
master;
file "master.localhost";

};

};



Zone
file:




$ORIGIN
0-127.199.19.64.IN-ADDR.ARPA.



@ IN SOA
slcdns1.redacted.com. administrator.redacted.com.
(




1379648159

10800



3600

604800

38400
)


@ IN NS
slcdns1.redacted.com.




@ IN NS
slcdns2.redacted.com.



55 IN PTR
slcdns1.redacted.com.



56 IN PTR
slcdns2.redacted.com.



...

...
...


Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits,

apache 2.2 - Server Potentially Compromised -- c99madshell

So, low and behold, a legacy site we've been hosting for a client had a version of FCKEditor that allowed someone to upload the dreaded c99madshell exploit onto our web host. I'm not a big security buff -- frankly I'm just a dev currently responsible for S/A duties due to a loss of personnel. Accordingly, I'd love any help you server-faulters could provide in assessing the damage from the exploit. To give you a bit of information: The file was uploaded into a directory within the webroot, "/_img/fck_uploads/File/". The Apache user and group are restricted such that they can't log in and don't have permissions outside of the directory from which we serve sites. All the files had 770 permissions (user rwx, group rwx, other none) -- something I wanted to fix but was told to hold off on as it wasn't "high priority" (hopefully this changes that). So it seems the hackers could've easily executed the script. Now I wasn't able