D
D
Denis Sechin2018-07-06 19:11:58
Domain Name System
Denis Sechin, 2018-07-06 19:11:58

Change ip with dns request?

I'm trying to implement the following: There is a small local network gateway ubuntu14 on it caching bind. You need to do the following: when a user requests a dns entry for example mail.ru, you need bind to answer him with an IP address, say 127.0.0.1. But my bind is not authoritative for the mail.ru zone. How to implement it? I had an idea to register myself as a master for the zone "." and write mail.ru in the root.db file: 127.0.0.1. It did not work, the server does not give dns answers at all, clients, in turn, immediately start working through the secondary dns that is registered in their resolv.conf. Please help. Thank you! Config:

acl guest_net {
        localhost;
        localnets;
        };

options {
        directory "/var/cache/bind";
        dnssec-validation yes;
        dnssec-enable yes;
        auth-nxdomain no;
        listen-on-v6 { any; };
        recursion yes;
        allow-query {guest_net; };

        forwarders {

        217.**.***.*;
        217.**.***.**;

        };
        forward only;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2018-07-06
@res2001

Create a mail.ru zone on your DNS and answer as you please.

O
Oleg Zakharov, 2018-07-06
@blazenn12

You can create a file db.mail.ru and already register the necessary ip in it. It is also necessary to add it to named.conf and declare it as a master.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question