Auto DNS Install and configure on Ubuntu

DNS Auto Install Script


#!/bin/bash
#
# Before
echo Before > quertytime.txt
dig distrowatch.com | grep 'Query time' >> quertytime.txt
#
sudo apt-get install bind9 dnsutils bind9-doc -y
#
sudo xxx /etc/bind/named.conf.options
  forwarders {
       8.8.8.8;
       8.8.4.4;
  };
#
sudo xxx /etc/bind/named.conf.local
zone "linux.rocks" {
             type master;
             file "/etc/bind/db.linux.rocks";
        };
 
zone "96.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/db.192";
};
#
sudo cp /etc/bind/db.local /etc/bind/db.linux.rocks
sudo xxx /etc/bind/db.linux.rocks
zie 192.168.1.4
#
sudo cp /etc/bind/db.127 /etc/bind/db.192
sudo xxx /etc/bind/db.192
#
sudo /etc/init.d/bind9 start
#
ping a-host-in-netwerk -c 4 > test.txt
#
#
# After
echo After >> quertytime.txt
dig distrowatch.com | grep 'Query time' >> quertytime.txt

No comments:

Post a Comment

Mikrotik Malicious Spam IP Blacklist – Firewall Auto Update Script

We have published a malicious ip blacklist for free! Combined dshield and spamhaus malicious blacklists formatted for Mikrotik RouterOS .r...