Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installasi DNS UNBOUND
- OS : Debian Squeeze 6
- domain : hade.war.net
- ip 192.168.1.150
- echo deb http://kambing.ui.ac.id/debian/ squeeze main non-free contrib | tee -a /etc/apt/sources.list
- echo deb-src http://kambing.ui.ac.id/debian/ squeeze main non-free contrib | tee -a /etc/apt/sources.list
- echo deb http://repo.ajenti.org/debian main main | tee -a /etc/apt/sources.list
- wget http://repo.ajenti.org/debian/key -O- | apt-key add -
- apt-get -y update && apt-get -y install unbound ajenti
- wget -O /etc/unbound/named.cache ftp://FTP.INTERNIC.NET/domain/named.cache
- unbound-control-setup
- chown unbound:root /etc/unbound/unbound_*
- chmod 440 /etc/unbound/unbound_*
- mv /etc/unbound/unbound.conf /etc/unbound/unbound.conf.old
- touch /etc/unbound/unbound.conf
- echo "server:
- verbosity: 1
- statistics-interval: 120
- num-threads: 1
- interface: 0.0.0.0
- outgoing-range: 512
- num-queries-per-thread: 1024
- msg-cache-size: 16m
- rrset-cache-size: 32m
- msg-cache-slabs: 4
- rrset-cache-slabs: 4
- cache-max-ttl: 86400
- infra-host-ttl: 60
- infra-lame-ttl: 120
- infra-cache-numhosts: 10000
- infra-cache-lame-size: 10k
- do-ip4: yes
- do-ip6: no
- do-udp: yes
- do-tcp: yes
- do-daemonize: yes
- # access-control: 0.0.0.0/0 allow
- access-control: 192.168.0.0/16 allow
- # access-control: 172.16.0.0/12 allow
- # access-control: 10.0.0.0/8 allow
- access-control: 127.0.0.0/8 allow
- access-control: 0.0.0.0/0 refuse
- chroot: \"/etc/unbound\"
- username: \"unbound\"
- directory: \"/etc/unbound\"
- #logfile: \"/etc/unbound/unbound.log\"
- #use-syslog: yes
- logfile: \"\"
- use-syslog: no
- pidfile: \"/etc/unbound/unbound.pid\"
- root-hints: \"/etc/unbound/named.cache\"
- identity: \"www.hade.war.net\"
- version: \"1.4\"
- hide-identity: yes
- hide-version: yes
- harden-glue: yes
- do-not-query-address: 127.0.0.1/8
- do-not-query-localhost: yes
- module-config: \"iterator\"
- #zone localhost
- local-zone: \"localhost.\" static
- local-data: \"localhost. 10800 IN NS localhost.\"
- local-data: \"localhost. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800\"
- local-data: \"localhost. 10800 IN A 127.0.0.1\"
- local-zone: \"127.in-addr.arpa.\" static
- local-data: \"127.in-addr.arpa. 10800 IN NS localhost.\"
- local-data: \"127.in-addr.arpa. 10800 IN SOA localhost. nobody.invalid. 2 3600 1200 604800 10800\"
- local-data: \"1.0.0.127.in-addr.arpa. 10800 IN PTR localhost.\"
- #zone hade.war.net
- local-zone: \"hade.war.net.\" static
- local-data: \"hade.war.net. 86400 IN NS ns.hade.war.net.\"
- local-data: \"hade.war.net. 86400 IN SOA hade.war.net. hostmaster.hade.war.net. 3 3600 1200 604800 86400\"
- local-data: \"hade.war.net. 86400 IN A 192.168.1.150\"
- local-data: \"www.hade.war.net. 86400 IN A 192.168.1.150\"
- local-data: \"ns.hade.war.net. 86400 IN A 192.168.1.150\"
- local-data: \"mail.hade.war.net. 86400 IN A 192.168.1.150\"
- local-data: \"hade.war.net. 86400 IN MX 10 mail.hade.war.net.\"
- local-data: \"hade.war.net. 86400 IN TXT v=spf1 a mx ~all\"
- local-zone: \"1.168.192.in-addr.arpa.\" static
- local-data: \"1.168.192.in-addr.arpa. 10800 IN NS hade.war.net.\"
- local-data: \"1.168.192.in-addr.arpa. 10800 IN SOA hade.war.net. hostmaster.hade.war.net. 4 3600 1200 604800 864000\"
- local-data: \"150.1.168.192.in-addr.arpa. 10800 IN PTR hade.war.net.\"
- forward-zone:
- name: \".\"
- forward-addr: 8.8.8.8
- forward-addr: 8.8.4.4
- remote-control:
- control-enable: yes
- control-interface: 127.0.0.1
- control-port: 953
- server-key-file: \"/etc/unbound/unbound_server.key\"
- server-cert-file: \"/etc/unbound/unbound_server.pem\"
- control-key-file: \"/etc/unbound/unbound_control.key\"
- control-cert-file: \"/etc/unbound/unbound_control.pem\"" >> /etc/unbound/unbound.conf
- unbound-checkconf /etc/unbound/unbound.conf untuk cek error Konfigurasi
- IPSERV=$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
- HOST_NAME=$(hostname -a)
- DOMAIN_NAME=$(hostname -d)
- sleep 1
- mv /etc/hosts /etc/hosts_
- touch /etc/hosts
- echo "127.0.0.1 localhost.localdomain localhost
- $IPSERV $HOST_NAME.$DOMAIN_NAME $HOST_NAME
- #
- ::1 localhost ip6-localhost ip6-loopback
- fe00::0 ip6-localnet
- fe00::0 ip6-mcastprefix
- ff02:1 ip6-allnodes
- ff02::2 ip6-allrouters
- ff02::3 ip6-allhosts" >> /etc/hosts
- sleep 2
- mv /etc/network/interfaces /etc/network/interfaces_
- sed '1,30{/dns-/d}' /etc/network/interfaces_ >> /etc/network/interfaces
- echo " dns-search hade.war.net
- dns-nameservers 127.0.0.1 192.168.1.150 8.8.8.8 8.8.4.4" >> /etc/network/interfaces
- sleep 2
- reboot
Advertisement
Add Comment
Please, Sign In to add comment