Diposting oleh

Cara Install Unbound Di FreeBSD 9.1

Diposting oleh
Jasa seting Mikrotik - Cara Install Unbound. Cara install unbound di freebsd 9.1 - Unbound salah satu software opensource digunakan sebagai server dns. Layaknya bind9 unbound dapat di gunakan untuk pemetaan domain terhadap ip address.


cara install unbound freebsd di freebsd 9.1, step by step semoga unboundnya bermanfaat di padukan dengan mikrotik.

pkg_add -rv unbound
cd /usr/local/etc/unbound
fetch ftp://FTP.INTERNIC.NET/domain/named.cache
unbound-control-setup
chown unbound:wheel unbound_*
chmod 440 unbound_*
mkdir /usr/local/etc/unbound/dev
echo "devfs   /usr/local/etc/unbound/dev devfs rw 0 0"  >> /etc/fstab
echo 'unbound_enable="YES"' >> /etc/rc.conf
echo 'devfs_set_rulesets="/usr/local/etc/unbound/dev=unbound_ruleset"' >> /etc/rc.conf

edit /usr/local/etc/unbound/unbound.conf

ee /usr/local/etc/unbound/unbound.conf

Cara mudah menginstall unbound di freebsd 9.1
Kemudian isikan unbound.conf di bawah ini, namun ubah dulu ipnya sesuai configurasi ip proxy anda.

unbond config

server:
verbosity: 1
statistics-interval: 120
extended-statistics: yes
statistics-cumulative: yes
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
#ip yang boleh mengakses unbound
access-control: 0.0.0.0/0 refuse
access-control: 192.168.3.0/24 allow
access-control: 192.168.200.0/24 allow     
access-control: 192.168.100.0/24 allow
access-control: 192.168.168.0/24 allow      
chroot: "/usr/local/etc/unbound"
username: "unbound"
directory: "/usr/local/etc/unbound"
logfile: ""
use-syslog: no
root-hints: "/usr/local/etc/unbound/named.cache"
     
identity: "DNS"
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 balaijaya.net (edit bagian ini sesuai ip proxy dan hostname
local-zone: "balaijaya.net." static
local-data: "balaijaya.net. 86400 IN NS ns1.balaijaya.net."
local-data: "balaijaya.net. 86400 IN SOA balaijaya.net. hostmaster.balaijaya.net.  3 3600 1200 604800 86400"
local-data: "balaijaya.net. 86400 IN A 172.17.18.2"
local-data: "www.balaijaya.net. 86400 IN A 172.17.18.2"
local-data: "ns1.balaijaya.net. 86400 IN A 172.17.18.2"

#isi dengan ip proxy server /dns server anda. 
local-zone: "18.17.172.in-addr.arpa." static
local-data: "18.17.172.in-addr.arpa. 10800 IN NS balaijaya.net."
local-data: "18.17.172.in-addr.arpa. 10800 IN SOA balaijaya.net. hostmaster.balaijaya.net. 4 3600 1200 604800 864000"
local-data: "2.18.17.172.in-addr.arpa. 10800 IN PTR balaijaya.net."

#seting untuk DNS Forward
forward-zone:
name: "."
forward-addr: 202.134.1.10
forward-addr: 202.134.0.155
forward-addr: 8.8.8.8
forward-addr: 8.8.4.4
forward-addr: 208.67.222.222
forward-addr: 208.67.220.220
forward-addr: 180.131.144.144
forward-addr: 180.131.145.145      
               
remote-control:
control-enable: yes
control-interface: 127.0.0.1
control-port: 953
server-key-file: "/usr/local/etc/unbound/unbound_server.key"
server-cert-file: "/usr/local/etc/unbound/unbound_server.pem"
control-key-file: "/usr/local/etc/unbound/unbound_control.key"
control-cert-file: "/usr/local/etc/unbound/unbound_control.pem"
set nameserver baru di file /etc/resolv.conf buat baris di bahah ini paling atas.
nameserver 127.0.0.1

Buat sebuah file bernama devfs.rules di /etc
#ee /etc/devfs.rules

[unbound_ruleset=20]
add hide
add path null unhide
add path zero unhide
add path crypto unhide
add path random unhide
add path urandom unhide

Simpan settingan unbound
devfs.rules

Lalu reboot server freebsd yang terinstall unbound didalamnya dengan perintah
reboot 

Chek apakah unbound sudah berjalan dengan baik, lakukan perintah chek unbound

unbound-control stats

Cara Install Unbound Di FreeBSD 9.1 . Semoga cara install unbound freebsd ini bermanfaat.

Tidak ada komentar:

Posting Komentar