L
L
Lizard2019-04-16 21:28:24
Domain Name System
Lizard, 2019-04-16 21:28:24

How to correctly write a direct conversion zone in bind9?

I have a local network, on the router of which I registered my dns server in dns.
The dns server has the following configuration:

cat /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";
        forwarders {
        8.8.8.8;
         };

        listen-on {
                217.182.51.246;
                127.0.0.1;
         };

        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

netstat -lnp | grep :53
tcp        0      0 217.182.51.246:53       0.0.0.0:*               LISTEN      4367/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      4367/named
tcp6       0      0 :::53                   :::*                    LISTEN      4367/named
udp     4608      0 217.182.51.246:53       0.0.0.0:*                           4367/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           4367/named
udp6       0      0 :::53                   :::*                                4367/named

[email protected]:~# cat  /etc/bind/db.test.com.nt
$TTL    3600
@       IN      SOA     ns.test.com. root.test.com.   (
                                     2008071001; Serial
                                     3600    ; Refresh
                                     900     ; Retry
                                     360000 ; Expire
                                     3600 )  ; Minimum
                 IN      NS      ns.test.com.
                 IN      NS      ns2.test.com.
                 IN      MX      10 mail

localhost       IN      A           127.0.0.1
vk.com.         IN      A           217.182.51.246
                HINFO   "INTEL P4" "FreeBSD"
ns              IN      A           217.182.51.246
ns2             IN      A           217.182.51.246
mail            IN      A           217.182.51.246
www             IN      A           217.182.51.246

The site is also spinning on the server, to which I want to redirect at the dns level.
Reboot, no errors. I clear the dns cache on the client. Does not work.
In fact, I need that when the client requests test.com , he goes to the site that is at 217.182.51.246.
Where did I make a mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2019-04-17
@hint000

1. add a line to the db.test.com.nt file
- IMHO this will be a refutation of the answer "To register test.com you need to create a com zone".
2. Also, take a look at this question: Hosts do not see the domain. Bind9 on Centos?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question