Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

To prevent sipXecs from changing the BIND configuration automatically you will need to change the mode in /etc/named.conf

Code Block
HTMLHTML
title/etc/named.conf
HTML
// WARNING: Name server configuration is a sipXecs automatically generated file.
//          Contents may be overwritten unless you change the mode to "Manual".
//          Available modes:
//          "Master"    - Master name server (on primary server).
//          "Slave"     - Slave named server (on distributed server).
//          "Caching"   - Caching only name server.
//          "Manual"    - Blocks future automatic updates.
// DNS_MODE="Manual"

...

Based on our example network scenario with the default sipXecs DNS setup (before setting up views), you should have BIND configuration and zone files similar to the following:

HTML
Code Block
HTML
title/etc/named.conf
HTML
// WARNING: Name server configuration is a sipXecs automatically generated file.
//          Contents may be overwritten unless you change the mode to "Manual".
//          Available modes:
//          "Master"    - Master name server (on primary server).
//          "Slave"     - Slave named server (on distributed server).
//          "Caching"   - Caching only name server.
//          "Manual"    - Blocks future automatic updates.
// DNS_MODE="Manual"

options {
        directory  "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        forwarders {
                208.67.222.222;
//              uses OpenDNS for external DNS lookups
        };
};

zone "example.com" IN {
    type master;
    file "example.com.zone";
    allow-update {
        none;
	};
    allow-query {
	10.0.1.0/24;
        10.0.2.0/24;
        10.0.3.0/24;
	};
    allow-transfer {
	10.0.2.10;
        10.0.3.10;
	};
    notify yes;
};

...

Note

/var/named/example.com.zone is actually a symlink to /var/named/chroot/var/named/example.com.zone for security reasons.

HTML
Code Block
HTML
title/var/named/example.com.zone
HTML
$TTL 1800
@	IN	SOA	ns1.example.com. root.example.com. (
			200911091434
			1800
			1800
			1800
			1800 )

example.com.            IN     NS     sip1.example.com.
example.com.            IN     NS     sip2.example.com.
example.com.            IN     NS     sip3.example.com.

example.com.		IN	NAPTR	2 0 "s" "SIP+D2T" "" _sip._tcp.example.com.
example.com.		IN	NAPTR	2 0 "s" "SIP+D2U" "" _sip._udp.example.com.

_sip._tcp.example.com.	IN	SRV	1 0 5060 sip1.example.com.
_sip._udp.example.com.	IN	SRV	1 0 5060 sip1.example.com.

_sip._tcp.example.com.	IN	SRV	1 0 5060 sip2.example.com.
_sip._udp.example.com.	IN	SRV	1 0 5060 sip2.example.com.

_sip._tcp.example.com.	IN	SRV	1 0 5060 sip3.example.com.
_sip._udp.example.com.	IN	SRV	1 0 5060 sip3.example.com.

_sip._tcp.rr.sip1.example.com.	IN	SRV	1   0 5070 sip1.example.com.
_sip._tcp.rr.sip1.example.com.	IN	SRV	2 100 5070 sip2.example.com.
_sip._tcp.rr.sip1.example.com.	IN	SRV	3 100 5070 sip3.example.com.

_sip._tcp.rr.sip2.example.com.	IN	SRV	1   0 5070 sip2.example.com.
_sip._tcp.rr.sip2.example.com.	IN	SRV	2 100 5070 sip1.example.com.
_sip._tcp.rr.sip2.example.com.	IN	SRV	3 100 5070 sip3.example.com.

_sip._tcp.rr.sip3.example.com.	IN	SRV	1   0 5070 sip3.example.com.
_sip._tcp.rr.sip3.example.com.	IN	SRV	2 100 5070 sip1.example.com.
_sip._tcp.rr.sip3.example.com.	IN	SRV	3 100 5070 sip2.example.com.

sip1.example.com.	IN	A	10.0.1.10
sip2.example.com.	IN	A	10.0.2.10
sip3.example.com.	IN	A	10.0.3.10

...

Here is the our /etc/named.conf file with views added for all three subnets of our example network scenario:

HTML
Code Block
HTML
title/etc/named.conf
HTML
// WARNING: Name server configuration is a sipXecs automatically generated file.
//          Contents may be overwritten unless you change the mode to "Manual".
//          Available modes:
//          "Master"    - Master name server (on primary server).
//          "Slave"     - Slave named server (on distributed server).
//          "Caching"   - Caching only name server.
//          "Manual"    - Blocks future automatic updates.
// DNS_MODE="Manual"

options {
        directory  "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        forwarders {
                208.67.222.222;
//              uses OpenDNS for external DNS lookups
        };
};

view LillyLn {
        match-clients {
                10.0.1.0/24;
                };
        zone "example.com" IN {
                type master;
                file "LillyLn.example.com.zone";
                allow-update {
                        none;
                        };
                allow-query {
                      	10.0.1.0/24;
                        10.0.2.0/24;
                        10.0.3.0/24;
	                      }
                allow-transfer {
                        10.0.2.10;
                        10.0.3.10
                        };
                notify yes;
                };
        };

view SanfordRd {
        match-clients {
                10.0.2.0/24;
                };
        zone "example.com" IN {
                type master;
                file "SanfordRd.example.com.zone";
                allow-update {
                        none;
                        };
                allow-query {
                      	10.0.1.0/24;
                        10.0.2.0/24;
                        10.0.3.0/24;
	                      }
                allow-transfer {
                        10.0.2.10;
                        10.0.3.10
                        };
                notify yes;
                };
        };

view JohnSt {
        match-clients {
                10.0.3.0/24;
                };
        zone "example.com" IN {
                type master;
                file "JohnSt.example.com.zone";
                allow-update {
                        none;
                        };
                allow-query {
                      	10.0.1.0/24;
                        10.0.2.0/24;
                        10.0.3.0/24;
	                      }
                allow-transfer {
                        10.0.2.10;
                        10.0.3.10
                        };
                notify yes;
                };
        };

...