Advertisement
febripratama

config bind chroot

Sep 9th, 2014
3,427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. include "/etc/rndc.key";
  2. // assume our server has the IP 192.168.10.5 serving the 192.168.10.0/24 subnet
  3. controls {
  4. inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndc-key"; };
  5. inet 192.168.20.2 allow { 192.168.20.0/24; } keys { "rndc-key"; };
  6. };
  7.  
  8. options {
  9. directory "/var/named";
  10. dump-file "/var/named/data/cache_dump.db";
  11. statistics-file "/var/named/data/named_stats.txt";
  12. pid-file "/var/run/named/named.pid";
  13. memstatistics-file "/var/named/data/named_mem_stats.txt";
  14.  
  15. recursion yes;
  16.  
  17. /* Path to ISC DLV key */
  18. bindkeys-file "/etc/named.iscdlv.key";
  19.  
  20. allow-recursion {
  21. localhost;
  22. 127.0.0.1;
  23. 192.168.20.0/24;
  24. };
  25.  
  26. // these are the opendns servers (optional)
  27. forwarders {
  28. 8.8.8.8;
  29. 8.8.4.4;
  30. };
  31.  
  32. listen-on {
  33. localhost;
  34. 127.0.0.1;
  35. 192.168.20.2;
  36. };
  37.  
  38. /*
  39. * If there is a firewall between you and nameservers you want
  40. * to talk to, you might need to uncomment the query-source
  41. * directive below. Previous versions of BIND always asked
  42. * questions using port 53, but BIND 8.1 uses an unprivileged
  43. * port by default.
  44. */
  45. // query-source address * port 53;
  46.  
  47. // so people can't try to guess what version you're running
  48. version "REFUSED";
  49.  
  50. allow-query {
  51. localhost;
  52. 127.0.0.1;
  53. 192.168.20.0/24;
  54. };
  55. };
  56.  
  57. server 192.168.20.2 {
  58. keys { rndc-key; };
  59. };
  60.  
  61. zone "." IN {
  62. type hint;
  63. file "named.ca";
  64. };
  65.  
  66. include "/etc/named.rfc1912.zones";
  67.  
  68. //forward zone
  69. zone "pepznet.co.id" IN {
  70. type master;
  71. file "pepznet.co.id.zone";
  72. //allow-update { none; };
  73. // we assume we have a slave dns server with the IP 192.168.10.6
  74. allow-transfer { 192.168.20.2; };
  75. notify yes;
  76. also-notify { 192.168.20.2; };
  77. };
  78.  
  79. //reserve zone
  80. zone "20.168.192.in-addr.arpa" IN {
  81. type master;
  82. file "192.168.20.zone";
  83. //allow-update { none; };
  84. // we assume we have a slave dns server with the IP 192.168.10.6
  85. allow-transfer { 192.168.20.2; };
  86. notify yes;
  87. also-notify { 192.168.20.2; };
  88. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement