Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #title :install-dns-on-ubuntu1404.sh
- #description :This script will install dns on ubuntu 14.04
- #author :Henry den Hengst
- #date :25 November 2014
- #version :0.1
- #usage :bash install-dns-on-ubuntu1404.sh
- #URL :-
- #user_password :-
- #notes :-
- #bash_version :-
- #credits_source :https://help.ubuntu.com/
- #
- sudo apt-get update && sudo apt-get upgrade -y
- sudo apt-get install bind9 dnsutils openssh-server ntp -y
- # Edit /etc/network/interfaces to meet your requirements.
- #
- sudo sed -i 's!dhcp!static!g' /etc/network/interfaces
- sudo sed -i '$ a\address 192.168.1.10' /etc/network/interfaces
- sudo sed -i '$ a\netmask 255.255.255.0' /etc/network/interfaces
- sudo sed -i '$ a\network 192.168.1.0' /etc/network/interfaces
- sudo sed -i '$ a\broadcast 192.168.1.255' /etc/network/interfaces
- sudo sed -i '$ a\gateway 192.168.1.1' /etc/network/interfaces
- #
- sudo sed -i '$ a\dns-nameservers 192.168.1.10 192.168.1.11 8.8.8.8 8.8.4.4' /etc/network/interfaces
- sudo sed -i '$ a\dns-search cloudconsult.local' /etc/network/interfaces
- sudo sed -i '$ a\dns-domain cloudconsult.local' /etc/network/interfaces
- #
- # restart network
- sudo service networking restart
- #
- cd /etc/bind/
- # sudo rm named.conf.options
- # sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/named.conf.options
- sudo rm named.conf.local
- sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/named.conf.local
- sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/db.cloudconsult.local
- sudo wget -c https://dl.dropboxusercontent.com/u/36257811/bind9/db.192
- sudo service bind9 restart
- sudo ufw enable
- sudo ufw allow OpenSSH
- sudo ufw allow Bind9
Advertisement
Add Comment
Please, Sign In to add comment