D
D
dmb_19452017-05-23 14:22:07
Domain Name System
dmb_1945, 2017-05-23 14:22:07

Centos 6/7 setting bind (split) to work 2 sides, who did it?

Hello everyone, the question is hackneyed, but I could not get to the point. I would like to know who did it and how?
Given:
1) LAN 192.168.0.0/24
2) WAN 1.1.1.1
3) Centos7+Bind sits in LAN with one interface behind NAT. Serves the external domain.com zone, everything works.
The task is to configure the bind config in such a way that:
- request from outside (from the world) to domain.com response from dns 1,1,1,1 (working)
- request from domain.com locale Response 192,168,0,2
Now in config 2 com and local zones. I want everything to be com.
There is a view and so on. Normally working config failed to blind.
If anyone can give some advice and explain I would be very grateful.
There is a lot of mana, BUT there the server has 2 network interfaces, I have 1.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2017-05-23
@chupasaurus

Honestly liquefied from here .
To the top or after the declaration of slaves in /etc/named.conf:

acl internals {
    127.0.0.0/8;
    10.0.0.0/24;
};

Create /etc/named/ directories internals/ and externals/, where we will store zone files for internal and external clients, respectively.
In the config instead of the usual zone declaration:
view "internal" {
    match-clients { internals; };
    zone "example.com" {
        type master;
        file "/etc/named/internals/db.example.com";
    };
};
view "external" {
    match-clients { any; };
    zone "example.com" {
        type master;
        file "/etc/named/externals/db.example.com";
        allow-transfer { slaves; };
    };
};

Slaves are not specified in the internal view so that data does not leak into them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question