I can't configure BIND to resolve example.org with it sub-domains.
I have local network with single server (LAN IP ADDRESS L.L.L.L and WAN: W.W.W.W) with NGINX, configured for several virtual servers.
I register 2-nd level domain (for example) example.org. I specified name servers for it: ns1.example.com and ns2.example.com which looks on my WAN address.
I need that domains:
- example.org
- test.example.org
- hello.example.org
and so on, were be aligned to my servers IP address.
OK, I have wrote this config in db.example.org
1 $TTL 3600
2 @ IN SOA ns1.example.org. hostmaster.example.org. (
3 20040603
4 3600
5 900
6 3600000
7 3600 )
8
9 @ IN NS ns1.example.org
10 @ IN NS ns2.example.org
11
12 @ IN A W.W.W.W
13 www.example.org. IN A W.W.W.W
14
15 ns1.example.org. IN A W.W.W.W
16 ns2.example.org. IN A W.W.W.W
17
18 subdomain.example.org. IN CNAME www.example.org.
19 test.example.org. IN CNAME www.example.org.
20
21
It works, but whether it is fully correct? (W.W.W.W - my IP address) Can I avoid 9 and 10 lines?