Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Selamat datang di blog zakylinuxer.blogspot.com

Friday, September 20, 2013

Setting Squid 2 dengan NCSA Othentikasi

Configuring Squid to use NCSA authentication module

The different authentication modules are distributed as binaries that come with Squid, and to configure them you have to know where they are located. This command listed their locations:
dpkg -L squid3 | grep ncsa_auth
For me the output was /usr/lib/squid3/ncsa_auth.
To enable the module, I opened the Squid configuration file in vi:
sudo vi /etc/squid3/squid.conf
I searched for the text TAG: auth_param to find where the authentication module is configured. Next I added the following configuration:
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/users
auth_param basic children 5
auth_param basic realm Paul's Squid!
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
Next, I needed to add the ACL to give the users access. I searched for TAG: acl in the Squid configuration file and added this ACL to the list:
acl ncsa_users proxy_auth REQUIRED
Then I searched for TAG: http_access to find where HTTP access rules are configured. Scrolling down, there's a section where you can insert your own rules. I added:
http_access allow ncsa_users

Restart Squid

Finally, I restarted Squid:
sudo service squid3 restart

Thursday, September 19, 2013

Masalah extension=php_intl.dll sewaktu Install Moodle 2.5

  
I have XAMPP 1.8.3-0 and PHP 5.5.0 installed.
1) edit php.ini:
from
;extension=php_intl.dll
to
extension=php_intl.dll
2) Simply copy all icu* * * *.dll files:
from
C:\xampp\php
to
C:\xampp\apache\bin
Then intl extension works!!!

Sumber : http://stackoverflow.com/questions/1451468/intl-extension-installing-php-intl-dll

Sunday, September 15, 2013

PHP Extension di Moodle 2.5

admin/environment/php extension/intl


The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.

MS Windows

To enable this extension add the following line to your php.ini file usually found in /php:
extension=php_intl.dll
And then set the intl.default_locale and intl.error_level directives in your php.ini file.
[intl]
intl.default_locale = en_utf8
intl.error_level = E_WARNING
The intl.error_level directive is optional.
In a WAMP installation it may be required to add the php path (e.g. C:\wamp\bin\php\php5.3.13 or C:\wamp\bin\php\php5.4.3) to the the system PATH so that the module4 could uploaded properly (see http://forum.wampserver.com/read.php?2,80704,82499 for a couple of other approaches).

Install Open SSL di Moodle 2.5


To install the openssl library on Windows
  1. Open the php.ini file found in the moodle/apache/bin (if not there then, in folder server/php/)
  2. Find the line: ;extension=php_openssl.dll
  3. Remove the ; at the beginning of the line
  4. Restart apache if necessary
Note: if Moodle fails to create a public key in Admin > Networking > Settings, you'll need to configurate your OPENSSL_CONF path. With Windows File Explorer find openssl.cnf file (usually in your php/extras directory). Rename it as openssl.conf. Then set OPENSSL_CONF in your Windows environment variable (example: C:/wamp/bin/php/extras/openssl/openssl.conf - do not forget the file name in the path, otherwise it doesn't work)
To install the openssl library on Unix
  1. You need to recompile PHP from source
  2. add --with-openssl to the command line when you run configure                                   Sumber : http://docs.moodle.org/25/en/admin/environment/php_extension/openssl 

Saturday, September 7, 2013

Load Balance Mikrotik dengan Konsep PCC

Load balance pada mikrotik adalah teknik untuk mendistribusikan beban trafik pada dua atau lebih jalur koneksi secara seimbang, agar trafik dapat berjalan optimal, memaksimalkan throughput, memperkecil waktu tanggap dan menghindari overload pada salah satu jalur koneksi.

Skenario :
1. ether1 dan ether2 terhubung pada internet service provider yang berbeda dengan besar bandwdith yang berbeda. ISP1 sebesar 512kbps dan ISP2 sebesar 256kbps
2. menggunakan web-proxy internal dan openDNS
3. Mikrotik RouterOS versi 4.5, karena fitur PCC mulai dikenal pada Mikrotik versi 3.24

konfigurasi
?
1
2
3
4
5
6
/ip address
add address=192.168.101.2/30 interface=ether1
add address=192.168.102.2/30 interface=ether2
add address=10.10.10.1/24 interface=wlan2
/ip dns
set allow-remote-requests=yes primary-dns=208.67.222.222 secondary-dns=208.67.220.220
Koneksi client menggunakan wireless wlan2 dengan range IP client 10.10.10.2 s/d 10.10.10.254 netmask 255.255.255.0, dimana IP 10.10.10.1 yang dipasangkan pada wlan2 berfungsi sebagai gateway dan dns server dari client. Jika anda menggunakan DNS dari salah satu ISP anda, maka akan ada tambahan mangle. Setelah pengkonfigurasian IP dan DNS sudah benar, selanjutnya mengatur default route ke masing-masing IP gateway ISP agar router meneruskan semua trafik yang tidak terhubung padanya ke gateway tersebut. Fitur yang digunakan adalah "fitur check-gateway" berguna jika salah satu gateway putus, maka koneksi akan dibelokkan ke gateway lainnya.
?
1
2
3
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.101.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.102.1 distance=2 check-gateway=ping
Untuk pengaturan Access Point sehingga PC client dapat terhubung dengan wireless,gunakan perintah
?
1
2
/interface wireless
set wlan2 mode=ap-bridge band=2.4ghz-b/g ssid=Mikrotik disabled=no
Agar pc client dapat melakukan koneksi ke internet, ganti IP private client ke IP public yang ada di interface publik anda yaitu ether1 dan ether2.
?
1
2
3
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether2
Sampai langkah ini, router dan pc client sudah dapat melakukan koneksi internet. Lakukan ping baik dari router ataupun pc client ke internet. Jika belum berhasil, cek kembali konfigurasi anda.

Webproxy Internal
Pada routerboard tertentu, seperti RB450G, RB433AH, RB433UAH, RB800 dan RB1100 mempunyai expansion slot (USB, MicroSD, CompactFlash) untuk storage tambahan. Pada contoh berikut akan menggunakan usb flashdisk yang dipasangkan pada slot USB. Untuk pertama kali pemasangan, storage tambahan ini akan terbaca statusnya invalid di /system store. Agar dapat digunakan sebagai media penyimpan cache, maka storage harus diformat dahulu dan diaktifkan Nantinya kita tinggal mengaktifkan webproxy dan set cache-on-disk=yes untuk menggunakan media storage. Jangan lupa untuk membelokkan trafik HTTP (tcp port 80) kedalam webproxy.
?
1
2
3
4
5
6
/store disk format-drive usb1
/store
add disk=usb1 name=cache-usb type=web-proxy activate cache-usb
/ip proxy set cache-on-disk=yes enabled=yes max-cache-size=200000KiB port=8080
/ip firewall nat
add chain=dstnat protocol=tcp dst-port=80 in-interface=wlan2 action=redirect to-ports=8080
Pengaturan Mangle
Pada load balancing kali ini yang akan digunakan adalah fitur yang disebut PCC (Per Connection Classifier). Dengan PCC anda bisa mengelompokan trafik koneksi yang melalui atau keluar masuk router menjadi beberapa kelompok. Pengelompokan ini bisa dibedakan berdasarkan src-address, dst-address, src-port dan atau dst-port. Router akan mengingat-ingat jalur gateway yang dilewati diawal trafik koneksi, sehingga pada paket-paket selanjutnya yang masih berkaitan dengan koneksi awalnya akan dilewatkan pada jalur gateway yang sama juga. Kelebihan dari PCC ini yang menjawab banyaknya keluhan sering putusnya koneksi pada teknik load balancing lainnya sebelum adanya PCC karena perpindahan gateway.
Sebelum membuat mangle load balance, untuk mencegah terjadinya loop routing pada trafik, maka semua trafik client yang menuju network yang terhubung langsung dengan router, harus di bypass dari load balancing.Anda dapat membuat daftar IP yang masih dalam satu network router dan memasang mangle pertama kali sebagai berikut :
?
1
2
3
4
5
6
7
/ip firewall address-list
add address=192.168.101.0/30 list=lokal
add address=192.168.102.0/30 list=lokal
add address=10.10.10.0/24 list=lokal
/ip firewall mangle
add action=accept chain=prerouting dst-address-list=lokal in-interface=wlan2 comment=”trafik lokal”
add action=accept chain=output dst-address-list=lokal
Pada kasus tertentu, trafik pertama bisa berasal dari Internet, seperti penggunaan remote winbox atau telnet dari internet dan sebagainya, oleh karena itu anda juga memerlukan mark-connection untuk menandai trafik tersebut agar trafik baliknya juga bisa melewati interface dimana trafik itu masuk
?
1
2
3
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=ether1 new-connection-mark=con-from-isp1 passthrough=yes comment=”trafik dari isp1”
add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=ether2 new-connection-mark=con-from-isp2 passthrough=yes comment=”trafik dari isp2”
Umumnya, sebuah ISP akan membatasi akses DNS servernya dari IP yang hanya dikenalnya, jadi jika anda menggunakan DNS dari salah satu ISP anda, anda harus menambahkan mangle agar trafik DNS tersebut melalui gateway ISP yang bersangkutan bukan melalui gateway ISP lainnya. Disini kami berikan mangle DNS ISP1 yang melalui gateway ISP1. Jika anda menggunakan publik DNS independent, seperti opendns, anda tidak memerlukan mangle dibawah ini.
?
1
2
/ip firewall mangle
add action=mark-connection chain=output comment=dns dst-address=202.65.112.21 dst-port=53 new-connection-mark=dns passthrough=yes protocol=tcp comment=”trafik DNS belajar.org” add action=mark-connection chain=output dst-address=202.65.112.21 dst-port=53 new-connection-mark=dns passthrough=yes protocol=udp add action=mark-routing chain=output connection-mark=dns new-routing-mark=route-to-isp1 passthrough=no
Karena pada pembahasan ini menggunakan webproxy pada router, maka trafik yang perlu di load balance ada 2 jenis, yang pertama trafik dari client menuju internet (non HTTP), dan kedua trafik dari webproxy menuju internet. Agar lebih terstruktur dan mudah dalam pembacaannya, gunakan custom-chain sebagai berikut :
?
1
2
/ip firewall mangle
add action=jump chain=prerouting comment=”lompat ke client-lb” connection-mark=no-mark in-interface=wlan2 jump-target=client-lb add action=jump chain=output comment=”lompat ke lb-proxy” connection-mark=no-mark out-interface=!wlan2 jump-target=lb-proxy
Pada mangle diatas, untuk trafik load balance client pastikan parameter in-interface adalah interface yang terhubung dengan client, dan untuk trafik loadbalance webproxy, gunakan chain output dengan parameter out-interface yang bukan terhubung ke interface client. Setelah custom chain untuk load balancing dibuat, anda dapat membuat mangle di custom chain tersebut sebagai berikut :
?
1
2
3
4
5
/ip firewall mangle
add action=mark-connection chain=client-lb dst-address-type=!local new-connection-mark=to-isp1 passthrough=yes per-connection-classifier=both-addresses:3/0 comment=”awal loadbalancing klien”
add action=mark-connection chain=client-lb dst-address-type=!local new-connection-mark=to-isp1 passthrough=yes per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=client-lb dst-address-type=!local new-connection-mark=to-isp2 passthrough=yes per-connection-classifier=both-addresses:3/2
add action=return chain=client-lb comment=”akhir dari loadbalancing”
?
1
2
3
4
5
/ip firewall mangle
add action=mark-connection chain=lb-proxy dst-address-type=!local new-connection-mark=con-from-isp1 passthrough=yes per-connection-classifier=both-addresses:3/0 comment=”awal load balancing proxy”
add action=mark-connection chain=lb-proxy dst-address-type=!local new-connection-mark=con-from-isp1 passthrough=yes per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=lb-proxy dst-address-type=!local new-connection-mark=con-from-isp2 passthrough=yes per-connection-classifier=both-addresses:3/2
add action=return chain=lb-proxy comment=”akhir dari loadbalancing”
Untuk contoh diatas, pada load balancing client dan webproxy menggunakan parameter pemisahan trafik pcc yang sama, yaitu both-address, sehingga router akan mengingat-ingat berdasarkan src-address dan dst-address dari sebuah koneksi. Karena trafik ISP yang berbeda (512kbps dan 256kbps), maka membagi beban trafiknya menjadi 3 bagian. 2 bagian pertama akan melewati gateway ISP1, dan 1 bagian terakhir akan melewati gateway ISP2. Jika masing-masing trafik dari client dan proxy sudah ditandai, langkah berikutnya tinggal membuat mangle mark-route yang akan digunakan dalam proses routing nantinya
?
1
2
3
4
5
6
7
/ip firewall mangle
add action=jump chain=prerouting comment=”marking route client” connection-mark=!no-mark in-interface=wlan2 jump-target=route-client
add action=mark-routing chain=route-client connection-mark=to-isp1 new-routing-mark=route-to-isp1 passthrough=no
add action=mark-routing chain=route-client connection-mark=to-isp2 new-routing-mark=route-to-isp2 passthrough=no
add action=mark-routing chain=route-client connection-mark=con-from-isp1 new-routing-mark=route-to-isp1 passthrough=no
add action=mark-routing chain=route-client connection-mark=con-from-isp2 new-routing-mark=route-to-isp2 passthrough=no
add action=return chain=route-client disabled=no
?
1
2
3
/ip firewall mangle
add action=mark-routing chain=output comment=”marking route proxy” connection-mark=con-from-isp1 new-routing-mark=route-to-isp1 out-interface=!wlan2 passthrough=no
add action=mark-routing chain=output connection-mark=con-from-isp2 new-routing-mark=route-to-isp2 out-interface=!wlan2 passthrough=no
Pengaturan Routing
Pengaturan mangle diatas tidak akan berguna jika anda belum membuat routing berdasar mark-route yang sudah dibuat. Pada tahap ini akan membuat routing backup, sehingga apabila sebuah gateway terputus, maka semua koneksi akan melewati gateway yang masing terhubung.
?
1
2
3
4
5
/ip route
add check-gateway=ping dst-address=0.0.0.0/0 gateway=192.168.101.1 routing-mark=route-to-isp1 distance=1
add check-gateway=ping dst-address=0.0.0.0/0 gateway=192.168.102.1 routing-mark=route-to-isp1 distance=2
add check-gateway=ping dst-address=0.0.0.0/0 gateway=192.168.102.1 routing-mark=route-to-isp2 distance=1
add check-gateway=ping dst-a
 
Sumber : http://hertasmin.blogspot.com/2013/04/load-balance-mikrotik-dengan-konsep-pcc.html

Friday, September 6, 2013

Design Wifi AP DHCP


Saturday, August 31, 2013

Kabel dengan DHCP