Advertisement
akhfa

Install DNS Ubuntu

Dec 17th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.42 KB | None | 0 0
  1. https://technet.microsoft.com/en-us/library/aa998082(v=exchg.65).aspx
  2. http://linux.m2osw.com/bind_errors
  3. https://devops.profitbricks.com/tutorials/configure-authoritative-name-server-using-bind-on-centos-6/
  4. https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-an-authoritative-only-dns-server-on-ubuntu-14-04
  5. http://serverfault.com/questions/310400/cofigure-bind-for-google-apps-mx-record
  6. sudo apt-get update
  7. sudo apt-get install bind9 bind9utils bind9-doc
  8. sudo nano /etc/bind/named.conf.options
  9.  
  10. options {
  11.         directory "/var/cache/bind";
  12.         recursion no;
  13.         allow-transfer { none; };
  14.  
  15.         dnssec-validation auto;
  16.  
  17.         auth-nxdomain no;    # conform to RFC1035
  18.         listen-on-v6 { any; };
  19. };
  20.  
  21. nano /etc/bind/named.conf.local
  22.  
  23. zone "example.com" {
  24.     type master;
  25.     file "/etc/bind/zones/db.example.com";
  26.     allow-transfer { 192.0.2.2; };
  27. };
  28.  
  29. zone "2.0.192.in-addr.arpa" {
  30.     type master;
  31.     file "/etc/bind/zones/db.192.0.2";
  32. };
  33.  
  34. mkdir /etc/bind/zones
  35. cp /etc/bind/db.local /etc/bind/zones/db.example.com
  36. cp /etc/bind/db.127 /etc/bind/zones/db.192.0.2
  37. nano /etc/bind/zones/db.example.com
  38.  
  39. $TTL    604800
  40. @       IN      SOA     ns1.example.com. admin.example.com. (
  41.                               5         ; Serial
  42.                          604800         ; Refresh
  43.                           86400         ; Retry
  44.                         2419200         ; Expire
  45.                          604800 )       ; Negative Cache TTL
  46. ;
  47.  
  48. ; Name servers
  49. example.com.    IN      NS      ns1.example.com.
  50. example.com.    IN      NS      ns2.example.com.
  51.  
  52. ; A records for name servers
  53. ns1             IN      A       192.0.2.1
  54. ns2             IN      A       192.0.2.2
  55.  
  56. ; Other A records
  57. @               IN      A       192.0.2.3
  58. www             IN      A       192.0.2.3
  59.  
  60.  
  61.  
  62. nano db.192.0.2
  63.  
  64. $TTL    604800
  65. @       IN      SOA     example.com. admin.example.com. (
  66.                               5         ; Serial
  67.                          604800         ; Refresh
  68.                           86400         ; Retry
  69.                         2419200         ; Expire
  70.                          604800 )       ; Negative Cache TTL
  71. ;
  72.  
  73. ; Name servers
  74.         IN      NS      ns1.example.com.
  75.         IN      NS      ns2.example.com.
  76.  
  77. ; PTR records
  78. 1       IN      PTR      ns1.example.com.
  79. 2       IN      PTR      ns2.example.com.
  80. 3       IN      PTR      www.example.com.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement