Wednesday, August 15, 2012

Install Unbound di Ubuntu


Install Unbound Di Ubuntu

Bagi kalangan para squider mungkin dah ga’ asing lagi dengan nama PDNSD, BIND, DNSMASQ dll yang gunanya sebagai dns resolver. Kali ini gw akan mencoba menggunakan unbound sebagai pengganti DNS resolver diatas
sebelum melangkah lebih jauh silahkan ditengok graphic dibawah ini Unbound
okey langsung saja qta mulai tahap instalasinya di ubuntu.cukup simpel koq

1
$ sudo apt-get install unbound
klo udah silahkan lakukan konfigurasi file dibawah ini :

1
$ cd /etc/unbound
1
$ sudo wget  ftp://FTP.INTERNIC.NET/domain/named.cache
1
2
3
$ sudo unbound-control-setup
$ sudo chown unbound:root unbound_*
$ sudo chmod 440 unbound_*
sesuaikan config **/etc/unbound/unbound.conf**, dan servis dns lainnya **(bind/dnsmasq dll)** harus di **stop** agar tidak bentrok) sekarang kita konfigurasi isi unboundnya. silahkan disesuaikan bagi yang mencobanya

1
$ sudo vi /etc/unbound/unbound.conf
(unbound.conf) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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.100.0/27 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: "/usr/local/etc/unbound"
         username: "unbound"
         directory: "/usr/local/etc/unbound"
         #logfile: "/usr/local/etc/unbound/unbound.log"
         #use-syslog: yes
         logfile: ""
         use-syslog: no
         pidfile: "/usr/local/etc/unbound/unbound.pid"
         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 dns.indolini.org
        #local-zone: "dns.indolini.org." static
        #local-data: "dns.indolini.org. 86400 IN NS ns1.dns.indolini.org."
        #local-data: "dns.indolini.org. 86400 IN SOA dns.indolini.org. hostmaster.dns.indolini.org.  3 3600 1200 604800 86400"
        #local-data: "dns.indolini.org. 86400 IN A 192.168.xx.xx"
        #local-data: "www.dns.indolini.org. 86400 IN A 192.168.xx.xx"
        #local-data: "ns1.dns.indolini.org. 86400 IN A 192.168.xx.xx"

        #local-data: "mail.dns.indolini.org. 86400 IN A 192.168.100.5"
        #local-data: "dns.indolini.org. 86400 IN MX 10 mail.dns.indolini.org."
        #local-data: "dns.indolini.org. 86400 IN TXT v=spf1 a mx ~all"

       #local-zone: "xx.168.192.in-addr.arpa." static
       #local-data: "xx.168.192.in-addr.arpa. 10800 IN NS dns.indolini.org."
       #local-data: "xx.168.192.in-addr.arpa. 10800 IN SOA dns.indolini.org. hostmaster.dns.indolini.org. 4 3600 1200 604800 864000"
       #local-data: "xx.xx.168.192.in-addr.arpa. 10800 IN PTR dns.indolini.org."

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: "/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"
klo udah silahkan cek filenya dl siapa tau ada yang error dengan perintah
1
$ sudo unbound-checkconf /etc/unbound/unbound.conf
yang gw kasih tanda pagar silahkan sesuaikan dengan ip(yg ada **xx**nya) dan zonenya masing2. untuk modem ato yang pake dhcp silahkan dipagar aja di depan masing2 kalimat yang gw bold diatas klo udah silahkan restart unboundnya
1
$ sudo /etc/init.d/unbound restart
sekarang tes (asumsi dah jalan)
1
2
3
4
5
root@indolini:~$ nslookup 192.168.xx.xx
Server: 127.0.0.1
Address: 127.0.0.1#53

x.xx.168.192.in-addr.arpa name = dns.indolini.org.
1
2
3
4
5
6
root@indolini:~$ nslookup dns.indolini.org
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: dns.indolini.org
Address: 192.168.xx.xx
klo udah silahkan tambahkan dns localhost di squid.conf nya
1
dns_nameservers 127.0.0.1
lalu rekonfigurasi ulang squidnya (dah tau jg khan perintahnya ) untuk melihat performanya silahkan di cek dengan perintah ini
1
$ sudo unbound-control stats  

Tuesday, August 7, 2012

Tutorial Installasi Ubuntu

CARA INSTALL UBUNTU SERVER UNTUK PROXY

Siapkan CD Linux Ubuntu 10.10 atau 10.04 untuk Intel atau untuk AMD
Jika mau pakai flashdisk lebih baik bootable-nya pakai universal usb installer atau pakai LiLi.
Contoh tutorial di bawah adalah untuk harddisk 80GB.

OKE, kita langsung saja pada tahap install:
1. Pilih language english
2. Pilih install ubuntu server
3. Choose langguage english
4. United states
5. "No" pada detect keyboard layout?
6. Pilih USA pada ubuntu installer main menu
7. Pilih USA pada keyboard layout
8. Continue pada configure the network
9. Configure network manually (isi misalnya: 192.168.7.2)
10. Netmask 255.255.255.0
11. Gateway 192.168.7.1
12. DNS name server addresses 192.168.7.1 203.130.193.74 8.8.8.8
13. Hotsname : myproxy
14. Domain name: kosongkan
15. Configure the clok pilih select from worldwide, pilih Jakarta
16. Menu partition disk pilih manual
17. Hapus dulu partisi yang lama
18. Guided partitioning-->manual
19. Create new partition pada free space
Ketik 1gb-->Primary-->Begining->use as = Ext4--> Mount point = /boot-> Mount options = noatime-->Bootable flag = on (jika tidak berubah menjadi on biarkan saja-->Done setting up the partition.
20. Create new partition lagi pada free space
ketik 17gb-->Logical-->Begining-->use as = Ext4-->Mount point = / -->Mount options = noatime-->Done setting up the partition
21. Pilih Create new partition lagi pada free space
ketik 2gb (2x ukuran ram di PC)-->Logcal-->Begining-->use as = swap area-->Done setting up the partition
22. Pilih Create new partition pada free space
ketik 5gb-->Logical-->Begining-->use as = Ext4-->Mount point = /var -->Mount options = noatime-->Done setting up the partition
23. Pilih Create new partition pada free space
ketik 5gb-->Logical-->Begining-->use as = Ext4-->Mount point = /usr -->Mount options = noatime-->Done setting up the partition
24. Pilih Create new partition pada free space

ketik 50gb-->Logical-->Begining-->use as = reseiferFS (intel) btrfs (AMD)-->Mount point = /cache -->Mount options = noatime dan no tail-->Done setting up the partition
25. Pilih Create new partition pada free space (sisanya)

ketik 5gb-->Logical-->Begining-->use as = Ext4-->Mount point = /home -->Mount options = noatime-->Done setting up the partition
26. Finis partitioning and write changes to disk, write the changes to disk, pilih yes
27. pada full name for the new user isi  myproxy, continue
28. pada Username for your account isi  myproxy, continue
29. pada a password for the new user isi 12345, continue
30. pada re-enter password to verify isi 12345, continue
31. pada use weak password pilih yes
32. pada encrypt your home directory pilih no
33. pada HTTP proxy information biarkan kosong, enter saja
34. pada configurasi apt 43% bila berhenti tekan enter, pada bila berhenti 81% tekan enter dan pilih no automatic update
35. pada choose software to install pilih OpenSSH server pilih continus pd finis the installation and
restart akan dimulai

SELESAI SUDAH.
Instalasi Ubuntu server untuk proxy server dengan Harddisk 80GB

Router - Proxy

DOWNLOAD ROUTER-PROXY SOFTWARE

Di bawah ini merupakan software dan OS router-proxy andalan untuk keperluan warnet, game online, RT-RW net, hotspot area dan perkantoran. Silahkan sedoooooot.........!!!!!

1. MIKROTIK routeros 2.9.27

2. UBUNTU SERVER 10.10 64-bit PC (AMD64) server install CD (udah dicoba dengan squid, hasilnya maknyoss)

3. ZeroShell-1.0.beta16.iso

4. 32-bit: FreeNAS™ 8.0.2      64-bit: FreeNAS™ 8.0.2

5. m0n0wall cdrom-1.33.iso

6. IPCOP INSTALATION CD VERSI TERAKHIR

7. SMOOTHWALL

8. BETWIN win2000/XP

9. Billing Warnet Serba Bisa HandyCafe

Install Squid di Ubuntu

Friday, April 20, 2012

Squid Proxy Server Youtube Cache

Pada tulisan sebelumnya mengenai Youtube Cache Super Squid Proxy, dikarenakan adanya kabar mengenai update terbaru dari youtube mengenai caching video, pada share baru ini, akan mengangkat tema Squid Proxy Server Youtube Cache
?
1
2
3
4
5
6
7
8
9
10
11
# apt-get update
# apt-get install squid squidclient squid-cgi
# apt-get install gcc
# apt-get install build-essential
# apt-get install sharutils
# apt-get install ccze
# apt-get install libzip-dev
# apt-get install automake1.9
# apt-get install acpid
# apt-get install unzip
# cd /tmp

?
1
2
3
# tar -xvzf LUSCA_HEAD-r14809.tar.gz
# cd LUSCA_HEAD-r14809


Patch Lusca Squid Anda
?
1
2
3
4
5
6
7
8
9
# tar -xvzf LUSCA_HEAD-r14809-YOUTUBE.PACTH.tar.gz
# patch -p0 < 3xx-loop.diff
# patch -p0 < async-issue.diff
# patch -p0 < http-gzip.diff
# patch -p0 < ignore-must-revalidate.diff
# patch -p0 < improve-nn-parser.diff
# patch -p0 < lusca-vary.diff
# patch -p0 < segmentation-fault.diff
?
1
./configure --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --sbindir=/usr/sbin --libexecdir=/usr/lib/squid --sysconfdir=/etc/squid --localstatedir=/var/spool/squid --datadir=/usr/share/squid  --enable-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs --enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap --with-aio --with-dl --enable-snmp --enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files --enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536
?
1
2
# make
# make install
?
1
2
3
4
5
6
# cd /etc/init.d/
# mv /etc/init.d/squid /etc/init.d/squid.backup
# mv /etc/init.d/squid.init.ubuntu /etc/init.d/squid
# sudo chmod +x /etc/init.d/squid
# /etc/init.d/squid stop
?
1
2
3
4
5
# mkdir -p /usr/local/share/squid
# chmod 777 /usr/local/share/squid
# cd /usr/local/share/squid
# tar -xvzf indoit-youtube-supercache.tar.gz
?
1
2
3
4
5
# chown proxy:proxy /cache1
# chown proxy:proxy /cache2
# chmod 777 /cache1
# chmod 777 /cache2
?
1
2
# chown proxy:proxy /usr/local/share/squid/supercache.conf
# chmod 777 /usr/local/share/squid/supercache.conf
?
1
2
# chown proxy:proxy /usr/local/share/squid/supercache.pl
# chmod 777 /usr/local/share/squid/supercache.pl
?
1
# chmod +x /usr/local/share/squid/supercache.pl
?
1
2
3
4
5
# cd /etc/squid/
# mv squid.conf squid.conf.backup
# unzip squid.conf.youtube-supercache.zip
# cp squid.conf.youtube-supercache squid.conf
?
1
2
3
# squid -f /etc/squid/squid.conf -z
# sudo /etc/init.d/squid restart
# squid -NDd1
?
1
# tail -f /var/log/squid/access.log | ccze
# reboot

FINISH