Localhost.localdomain does not pay well

Asked 2 years ago, Updated 2 years ago, 132 views

Reference site: http://www.obenri.com/_dnsserver/named_test.html

I wanted to resolve the name of the reverse lookup for the loopback address.
Executed the following command:

[root@localhost~]#host-a localhost.localdomain
Trying "localhost.localdomain"
Received 114 bytes from 192.168.1.1#53 in 1784 ms
Trying "localhost.localdomain"
Host localhost.localdomain not found:3 (NXDOMAIN)
Received 114 bytes from 192.168.1.1 #53 in 1998 ms

I thought that normally;ANSWER SECTION: would show the 127.0.0.1 notation, but
Not found appears.

Please let me know which part of the configuration is wrong.

The named.conf configuration is as follows.

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named (8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See/usr/share/doc/bind*/sample/for example named configuration files.
//

options{
        # listen-on port 53 { 127.0.0.1; };
        # listen-on-v6 port53 {::1;};
        version "unknown";
        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";
        allow-query {
                    127.0.0.1;
                    192.168.1.0/24;
        };
        allow-recursion {
                    127.0.0.1;
                    192.168.1.0/24;
        };
        allow-transfer {
                    127.0.0.1;
                    192.168.1.0/24;
        };


        recurrence yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key*/
        bindkeys-file "/etc/named.iscdlv.key";
        forwards {
                192.168.1.1;
                XXX.XX.XX.XXX;
                XXX.XXX.XX.XX;
        };

        managed-keys-directory "/var/named/dynamic";
};

logging {
        channel "default-log" {
                file"/var/log/named/default.log" versions 5 size 10M;
                severity debug;
                print-time yes;
                print-severity yes;
                print-category yes;
        };

        category default {"default-log";};
};



view "internal" {
        match-clients {192.168.1.0/24;};
        match-destinations {192.168.1.0/24;};

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

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/etc/named.hogehoge.dip.jp.zone";
};

view "external" {
        match-clients {any;};
        match-destinations {any;};
        recovery no;
        include "/etc/named.hogehoge.dip.jp.zone.wan";
};

Thank you for your cooperation.

centos dns

2022-09-29 22:23

1 Answers

No localdomain zone information is defined in the configuration.

In some operating systems, localdomain zone information is set by default, so you can resolve the localhost name without doing anything, but if not, you must configure it yourself.

DNS (especially bind) can cause serious security problems if misconfigured, so it is highly recommended that you use it after reading and understanding the documentation that describes the whole thing instead of trying it in the dark.


2022-09-29 22:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.