Lokasi Ardelindo Aples Depok


View Ardelindo Aples in a larger map

Sabtu, 03 Oktober 2009

Spamassassin Postfix Virtual Domain

Instalasi Spamassassin
apt-get install perl spamass-milter spamc spamassassin

Penambahan User
groupadd -g 5005 spamd
useradd -u 5005 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd
mkdir /var/lib/spamassassin
chown spamd:spamd /var/lib/spamassassin

Konfigurasi Filter Spam
vim /etc/spamassassin/local.cf
required_score 3.0
use_bayes 1
bayes_auto_learn 1

Konfigurasi Postfix master.cf
vim /etc/postfix/master.cf

smtp inet n - - - - smtpd
-o content_filter=spamassassin

spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}

Selasa, 15 September 2009

Proftpd FTP OpenLDAP

Instalasi ProFTPD
apt-get install proftpd proftpd-ldap

Konfigurasi ProFTPD
vim /etc/proftpd/proftpd.conf

DefaultRoot ~
RequireValidShell off
#
# Alternative authentication frameworks
#
Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf


Konfigurasi ProFTPD
vim /etc/proftpd/ldap.conf


LDAPServer localhost
LDAPDNInfo "cn=admin,dc=ardelindo,dc=com" "1111"
#LDAPDoAuth on "ou=Users,dc=ardelindo,dc=com"
LDAPDoAuth on "ou=Users,dc=ardelindo,dc=com" (&(uid=%v)(objectclass=posixAccount))
LDAPDoUIDLookups on "ou=Users,dc=ardelindo,dc=com"
LDAPDoGIDLookups on "ou=Groups,dc=ardelindo,dc=com"


Powered By Ardelindo Aples (www.ardelindo.com)

Rabu, 29 Juli 2009

Nginstall Chat Server Jabber di (K)Ubuntu

Ejabberd

Enak lho bisa chatting sama orang2 sekantor kalo lokal. Gak ngaruh sama lingkungan luar. Jadi kalo internet mati kayak waktu itu (kasus gempa Taiwan), gak bakal jadi masalah besar. Berikut ini adalah how to install ejabberd chat server yang mendukung banyak protokol termasuk jabber.

1) Install paket ejabberd

sudo apt-get install ejabberd

2) Edit domain di /etc/ejabberd/ejabberd.cfg. Pasang komen pada localhost dengan menggunakan % (PERHATIKAN ADA TITIK SETELAH “}”)

%{hosts, ["localhost"]}.
{hosts, ["kerenabis.com"]}.

3) Restart untuk mengaktifkan chat kerenabis.com

sudo /etc/init.d/ejabberd restart

4) Tambah user untuk mengatur segalanya (jika Anda memiliki sistem LDAP, langsung lompat ke tahap 5)

sudo ejabberdctl register penguasa kerenabis.com penguasaPassword

Untuk menjadikan ia admin, tambah edit file /etc/ejabberd/ejabberd.cfg. Tambahkan

{acl, admin, {user, “penguasa”}}

5) Jika Anda pakai LDAP.

% sancho21: kita pakai LDAP
%{auth_method, internal}.

% For LDAP authentication use these lines instead of above one:
{auth_method, ldap}.
{ldap_servers, ["localhost"]}. % List of LDAP servers
{ldap_uidattr, “uid”}. % LDAP attribute that holds user ID
{ldap_base, “ou=People,dc=kerenabis,dc=com”}. % Search base of LDAP directory
{ldap_rootdn, “cn=admin,dc=kerenabis,dc=com”}. % LDAP manager
{ldap_password, “password sang admin”}. % Password to LDAP manager

6) Buka web administrasi http://localhost:5280/admin. Masukkkan secara lengkap penguasa@kerenabis.com dan isi passwordnya

7) Untuk klien bisa memasukkan di Gaim sebagai Jabber. Servernya jangan lupa dioverride ke ip server. Karena kerenabis.com itu hanya nama virtual untuk chat saja.

Sebenarnya protokol lain juga didukung. Tapi saya belum tahu saja caranya. Oh, ya selamat mencoba!

Referensi:

http://michsan.wordpress.com/2007/01/30/nginstall-chat-server-jabber-di-kubuntu/

Selasa, 28 Juli 2009

SASL2 mod-LDAP

Kamas Muhammad


Tidak ada copyright apapun dalam dukumen ini, anda bebas menyalin, mencetak, maupun memodifikasi. Saran, koreksi, kritik, kesalahan ketik, maupun ucapan silakan dikirimkan ke email tersebut diatas. Terima Kasih.


Latar Belakang

Selama ini saya menggunakan librari Cyrus-SASL2 pada postfix untuk menyediakan layanan SMTP Authentication. Ya, memang biasa saja, tapi biasanya saya harus melakukan kompilasi terlebih dahulu walau toh pada akhirnya hasil yang saya dapat adalah file deb-installer. Tidak ada hal khusus yang saya lakukan terhadap source code, hanya mengubah opsi pada proses configure agar menyertakan mekanisme authdaemon.

Saya menggunakan cara kompilasi karena by default paket pustaka sasl yang dibuat oleh Debian tidak mendukung penggunaan courier-authdaemon sebagai authentication backend. Data username dan password biasanya saya simpan menggunakan MySQL. Apakah sasl tidak bisa membaca data pada database? Bisa. Hanya saja menurut apa yang telah saya coba, pustaka itu (menggunakan modul auxprop) tidak dapat melakukan validasi bila passwordnya tersimpan dalam bentuk hashed. Kebetulan data password yang saya punya biasanya berbentuk Crypt-MD5. Mungkin saja saya yang tidak tahu bagaimana caranya, tapi untuk singkatnya: Saya tidak bisa.

Kebetulan data akun email pada server terakhir yang saya bangun disimpan menggunakan OpenLDAP. Sekilas lihat ternyata ada paket libsasl2-modules-ldap. Saya sempat berprasangka bahwa dengan modul itu sasl tidak melakukan pencocokan data sendiri. Proses pemeriksaan diserahkan pada pustaka OpenLDAP. Kalau memang benar begitu, seharusnya apa pun bentuk hash-nya asal jenis hash itu bisa ditangani oleh OpenLDAP, proses otentikasi tetap bisa dilakukan.

Kalau ternyata memang benar-benar bisa, manfaat yang saya dapat adalah pengurangan proses kompilasi ketika melakukan upgrade. Apa prosesnya sulit? Tidak juga. Keseluruhan proses bisa dijalankan dalam waktu kurang dari 5 menit :-) Lalu kenapa coba diubah? Namanya juga iseng. Boleh kan? He..he..he..

Gambaran Sistem

Saya menggunakan postfix 2.5 di mana data user disimpan pada direktori LDAP. Pengiriman email menggunakan mail client dapat dilakukan setelah melalui proses otentikasi. Atribut yang menyimpan username adalah uid, sedangkan password disimpan pada atribut userPassword dalam bentuk Crypt-MD5 hashed.

dn: uid=kamas,o=users,dc=sokam,dc=or,dc=id
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: qmailUser
uid: kamas
o: users
sn: kamas
accountStatus: active
mail: kamas@sokam.or.id
mailMessageStore: sokam.or.id/k/kamas/Maildir/
cn: Kamas Muhammad
mailQuotaSize: 0
userPassword: {crypt}$1$B8RKHiNI$XPXIhmMReW6PpfpWOw2Y3.

Sebelumnya, inilah isi file /etc/postfix/sasl/smtpd.conf:

pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path: /var/run/courier/authdaemon/socket

Instalasi & Konfigurasi

Saya menggunakan Debian Lenny. Proses instalasi dilakukan seperti biasa yaitu dengan menggunakan apt-get.

[root@host]# apt-get install libsasl2-modules-ldap
...
...
Setting up sasl2-bin (2.1.22.dfsg1-23) ...
To enable saslauthd, edit /etc/default/saslauthd and set START=yes (warning).
Setting up libsasl2-modules-ldap (2.1.22.dfsg1-23) ...

Setelah instalasi selesai ubah beberapa bagian file /etc/default/saslauthd mengikuti panduan dari Debian[1]. Beberapa parameter yang diubah adalah:

  1. START=yes
  2. MECHANISMS="ldap"
  3. OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

Penjelasan tentang mengapa direktori soket saslauthd ditempatkan pada direktori seperti yang disebutkan pada konfigurasi OPTIONS dapat ditemukan di README sasl2-bin yang disertakan oleh Debian[1].

Setelah itu buat file /etc/saslauthd.conf dengan isi seperti berikut, mengacu sebagian info dari halaman mail archive[2] yang penjelasan lengkapnya dapat dilihat pada daftar konfigurasi saslauthd[3].

ldap_servers: ldaps://ldap.sokam.or.id
ldap_password_attr: userPassword
ldap_filter: uid=%U
ldap_search_base: o=users,dc=sokam,dc=or,dc=id

Ubah pula file /etc/postfix/sasl/smtpd.conf seperti berikut:

pwcheck_method: saslauthd
mech_list: LOGIN

Dicoba

Jalankan dulu saslauthd, kemudian cobalah melakukan otentikasi menggunakan testsaslauthd.

[root@host]# /etc/init.d/saslauthd start
Starting SASL Authentication Daemon: saslauthd.
[root@host]# testsaslauthd -u kamas -p iniPassWordNyah
0: OK "Success."

Kalau sudah keluar 0: OK "Success" seperti di atas berarti proses otentikasi berjalan lancar. Kalau keluar teks 0: NO "authentication failed" tampaknya anda belum beruntung. Kalau keluar tulisan connect() : No such file or directory coba tambahkan parameter -f diikuti dengan lokasi soket saslauthd.

[root@host]# testsaslauthd -f /var/spool/postfix/var/run/saslauthd/mux -u kamas -p iniPassWordNyah

Setelah itu cobalah melakukan otentikasi pada postfix. Saya menggunakan proses telnet sehingga tidak perlu mencoba menggunakan program mail client apa pun. Contohnya ditunjukkan pada bagian berikut:

[root@host]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.sokam.or.id ESMTP Postfix (Debian/GNU)
HELO imutlucu
250 mail.sokam.or.id
AUTH LOGIN
334 VXNlcm5hbWU6
a2FtYXM=
334 UGFzc3dvcmQ6
aW5pUGFzc1dvcmROeWFo
235 2.7.0 Authentication successful
QUIT
221 2.0.0 Bye
Connection closed by foreign host.

Bagian yang dicetak tebal adalah username dan password dalam bentuk base64-encoded. Tulisan "Autentication successful" menunjukkan bahwa username dan password yang dimasukkan benar.

Referensi

  1. http://www.sokam.or.id/artikel/SASL2-LDAP.html
  2. file:///usr/share/doc/sasl2-bin/README.Debian.gz
  3. http://www.imc.org/ietf-sasl/mail-archive/msg01862.html
  4. http://www.irbs.net/internet/info-cyrus/0207/att-0599/LDAP_SASLAUTHD

Senin, 27 Juli 2009

Authentifikasi FreeRadius OpenLDAP

Konfigurasi SLAPD
cd freeradius-1.1.6
cp doc/examples/openldap.schema /etc/ldap/schema/
vim /etc/ldap/slapd.conf
##########################################
include /etc/ldap/schema/openldap.schema
##########################################

Konfigurasi FreeRadius
vim /usr/local/etc/raddb/radiusd.conf

ldap {
server = "127.0.0.1"
identity = "cn=budi,dc=ardelindo,dc=com"
password = rahasia
basedn = "dc=ardelindo,dc=com"
filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
# base_filter = "(objectclass=radiusprofile)"
#access_attr = "dialupAccess"
edir_account_policy_check=yes
dictionary_mapping = ${raddbdir}/ldap.attrmap
}


authorize {
preprocess
chap
mschap
#digest
#IPASS
suffix
#ntdomain
#eap
#files
#sql
#etc_smbpasswd
ldap
#daily
#checkval
#pap
}

authenticate {
#Auth-Type PAP {
#pap
#}
#Auth-Type CHAP {
#chap
#}
# MSCHAP authentication.
#Auth-Type MS-CHAP {
#mschap
#}
#digest
#pam

#unix

Auth-Type LDAP {
ldap
}
#eap
}

Test Authentifikasi Radius

Sisi Klien
root@ubuntu:~/hotspot/freeradius-1.1.6# radtest budi 23 localhost 0 testing123
Sending Access-Request of id 95 to 127.0.0.1 port 1812
User-Name = "budi"
User-Password = "23"
NAS-IP-Address = 255.255.255.255
NAS-Port = 0
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=95, length=20

Log Server Radius
rad_check_password: Found Auth-Type ldap
auth: type "LDAP"
Processing the authenticate section of radiusd.conf
modcall: entering group LDAP for request 2
rlm_ldap: - authenticate
rlm_ldap: login attempt by "budi" with password "23"
rlm_ldap: user DN: uid=budi,ou=Users,dc=ardelindo,dc=com
rlm_ldap: (re)connect to 127.0.0.1:389, authentication 1
rlm_ldap: bind as uid=budi,ou=Users,dc=ardelindo,dc=com/23 to 127.0.0.1:389
rlm_ldap: waiting for bind result ...
rlm_ldap: Bind was successful
rlm_ldap: user budi authenticated succesfully
modcall[authenticate]: module "ldap" returns ok for request 2
modcall: leaving group LDAP (returns ok) for request 2
Sending Access-Accept of id 129 to 127.0.0.1 port 44721
Finished request 2
Going to the next request
--- Walking the entire request list ---

Minggu, 26 Juli 2009

Authentifikasi SMTP postfix TLS

Setup Postfix TLS Encryption
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

nano /etc/postfix/main.cf
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
/etc/init.d/postfix restart

Konfigurasi Dovecot TLS
vim /etc/dovecot/dovecot.conf

ssl_disable = no
ssl_key_file = /etc/postfix/ssl/smtpd.key
ssl_cert_file = /etc/postfix/ssl/smtpd.crt
ssl_key_password = admin
ssl_ca_file = /etc/postfix/ssl/cacert.pem



Konfigurasi Mail Client Evolution

Senin, 13 Juli 2009

Authentifikasi SMTP Postfix SASL & Database MySQL

Sekarang kita bahas cara membuat authentifikasi SMTP postfix SASL yang terintegrasi dengan database MySQL (masih berhubungan dengan artikel postfix admin sebelumnya).
Dengan authentifikasi SASL, email client bisa melakukan relay dari sembarang IP, sebelum mengirimkan email ke SMTP pengguna akan ditanyakan username dan password virtual domain.
Oke kita langsung aja, langkah pertama adalah melakukan instalasi library sasl ...

Instalasi Paket SASL

apt-get install postfix-tls sasl2-bin libsasl2 libsasl2-modules libpam-mysql openssl

Konfigurasi PAM SMTP

vim /etc/pam.d/smtp

auth required pam_mysql.so user=postfix passwd=yourpass host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1 md5=1

account sufficient pam_mysql.so user=postfix passwd=yourpass host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1 md5=1

Konfigurasi SASL SMTPD
vim /etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd

mech_list: PLAIN LOGIN

log_level: 5


Autorun SASLAUTHD

vim /etc/default/saslauthd

START=yes

MECHANISMS="pam"

OPTIONS="-c -r -m /var/spool/postfix/var/run/saslauthd"


Buat Direktori Postfix SASL

mkdir /var/spool/postfix/var/
mkdir /var/spool/postfix/var/run/
mkdir /var/spool/postfix/var/run/saslauthd
chown -R root:sasl /var/spool/postfix/var/
chmod 710 /var/spool/postfix/var/run/saslauthd
adduser postfix sasl

ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd


Konfigurasi Postfix SMTP

vim /etc/postfix/main.cf

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

smtpd_sasl_local_domain =

broken_sasl_auth_clients = yes

smtpd_sasl_authenticated_header = yes

smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination


Test Authentifikasi Postfix
root@aples-desktop:~# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 aples-desktop.bengkel-linux.co.cc ESMTP Postfix (Ubuntu)
ehlo aples-desktop.bengkel-linux.co.cc
250-aples-desktop.bengkel-linux.co.cc
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN


Setup Evolution Email SASL


Test Authentifikasi SASL Evolution Mail

Kamis, 09 Juli 2009

Ubuntu Virtual Web Hosting

APACHE VIRTUAL HOSTING


Virtual hosting dipergunakan saat kita mengelola beberapa domain hanya dengan 1 IP publik. Pada apache web server konfigurasi virtual domain ada dua macam, pertama berbasis IP, yaitu kita membuat ip alias pada web server dan kedua berbasis nama, yaitu kita membuat nama virtual pada direktif httpd.conf. Pada bagian ini kita bahas cara membuat virtual domain berbasis nama pada apache web server, langkah pembuatan adalah sebagai berikut.


Buat user hosting dengan perintah

useradd -s /bin/false -m hosting

useradd -s /bin/false -m tux

passwd hosting

passwd tux


Login ke user hosting / tux dan buat direktori

mkdir public_html

mkdir cgi-bin

mkdir -p var/log

touch var/log/access.log

touch var/log/error.log

echo “Test Page Website Linux.Co.Id” >> public_html/index.html


UserDir

vim /etc/apache2/mods-enabled/dir.conf

UserDir public_html

UserDir enabled hosting tux

Options ExecCGI

SetHandler cgi-script


vim /etc/apache2/sites-enabled/000-default

NameVirtualHost *

ServerName www.hosting.net.id

DocumentRoot /home/hosting/public_html

ErrorLog /home/hosting/var/log/error.log

TransferLog /home/hosting/var/log/access.log

ServerAdmin budi@hosting.net.id


ServerName hosting.net.id

DocumentRoot /home/hosting/public_html

ErrorLog /home/hosting/var/log/error.log

TransferLog /home/hosting/var/log/access.log

ServerAdmin budi@hosting.net.id


ServerName www.tux.net.id

DocumentRoot /home/tux/public_html

ErrorLog /home/tux/var/log/error.log

TransferLog /home/tux/var/log/access.log

ServerAdmin budi@tux.net.id


ServerName tux.net.id

DocumentRoot /home/tux/public_html

ErrorLog /home/tux/var/log/error.log

TransferLog /home/tux/var/log/access.log

ServerAdmin budi@tux.net.id

FTP SERVER


Untuk melakukan manajemen content web server pelanggan harus melakukan upload data ke public_html user melalui ftp server. Tahap instalasi ftp server pada Ubuntu cukup mudah. Berikut ini langkah instalasi dan konfigurasi ftp server pada ubuntu.

  1. Perintah instalasi proftpd.

    apt-get install proftpd

  2. Kemudian kita konfigurasi file /etc/proftpd.conf

    ServerName "ProFTPD Default Installation"

    ServerType standalone

    DefaultServer on

    AllowStoreRestart on

    Port 21

    Umask 022

    MaxInstances 30

    User nobody

    Group apache

    DefaultRoot ~

    RequireValidShell off

    AllowOverwrite on

    PersistentPasswd off

  3. Restart ProFTPD

    /etc/init.d/proftpd restart

  4. Login sebagai user hosting melalui ftp client




Senin, 06 Juli 2009

Ubuntu Virtual Domain Postfix Admin, Dovecot dan MySQL



Sekarang akan kita bahas cara membuat virtual domain dengan menggunakan postfix admin, dovecot dan database mysql.

Langkah yang perlu kita tempuh adalah:

1. Download source postfix admin di
http://sourceforge.net/projects/postfixadmin/

2. kemudian extraxt di direktori /var/www/
root@budi-desktop:~# cd /var/www/
root@budi-desktop:/var/www# tar xzf /home/ardelindo/Desktop/postfixadmin-2.2.1.1.tar.gz
root@budi-desktop:/var/www# mv postfixadmin-2.2.1.1/ postfix
root@budi-desktop:/var/www# chown -R www-data.www-data /var/www

3. Install aplikasi utama
root@budi-desktop:~# apt-get install postfix postfix-msql php5-imap dovecot-pop3d dovecot-imapd php5-mysql squirrelmail

4. Buat database postfix
root@budi-desktop:~# mysql
mysql> create database postfix;
mysql> grant all privileges on postfix.* to 'postfix'@'localhost' identified by 'postfixpassword';
mysql> grant all privileges on postfix.* to 'postfix'@'127.0.0.1' identified by 'postfixpassword';
mysql> exit

5. Setup config.inc.php postfixadmin
root@budi-desktop:~# vim /var/www/postfix/config.inc.php
// Database Config
// mysql = MySQL 3.23 and 4.0
// mysqli = MySQL 4.1
// pgsql = PostgreSQL
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfix';
$CONF['database_password'] = 'postfixpassword';
$CONF['database_name'] = 'postfix';
$CONF['database_prefix'] = '';

6. Setup postfix admin
buka web browser firefox kemudian buka URL
http://127.0.0.1/postfix/setup.php

setelah selesai hapus setup.php
root@budi-desktop:~# rm -fr /var/www/postfix/setup.php

7. Konfigurasi MySQL postfix
vim /etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = postfixpassword
hosts = 127.0.0.1
dbname = postfix
table = alias
select_field = goto
where_field = address
vim /etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfixpassword
hosts = 127.0.0.1
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'
vim /etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfixpassword
hosts = 127.0.0.1
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'
vim /etc/postfix/mysql_relay_domains_maps.cf
user = postfix
password = postfixpassword
hosts = 127.0.0.1
dbname = postfix
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '1'
vim /etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfixpassword
hosts = 127.0.0.1
dbname = postfix
table = domain
select_field = domain
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'
chgrp postfix /etc/postfix/mysql_*.cf
chmod 640 /etc/postfix/mysql_*.cf
groupadd -g 5000 vmail
useradd -m -g vmail -u 5000 -d /home/vmail -s /bin/bash vmail


8. Konfigurasi /etc/postfix/main.cf
vim /etc/postfix/main.cf
# Virtual Mailbox Domain Settings

myhostname = ubuntu
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 5000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_transport = virtual

# Additional for quota support

virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the your maildir has overdrawn your diskspace
quota, please free up some of spaces of your mailbox try again.
virtual_overquota_bounce = yes
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination =
relayhost =
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = all
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


9. Konfigurasi Dovecot POP3 dan IMAP4
vim /etc/dovecot/dovecot.conf
protocols = imap pop3
disable_plaintext_auth = no
default_mail_env = maildir:/home/vmail/%u/
first_valid_uid = 5000
first_valid_gid = 5000

# SQL database

passdb sql {
# Path for SQL configuration file
args = /etc/dovecot/dovecot-sql.conf
}

# SQL database

userdb sql {
# Path for SQL configuration file
args = /etc/dovecot/dovecot-sql.conf
}
vim /etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=postfix user=postfix password=postfixpassword
default_pass_scheme = CRYPT
user_query = SELECT maildir, 5000 AS uid, 5000 AS gid FROM mailbox WHERE username = '%u'
password_query = SELECT password FROM mailbox WHERE username = '%u'


10. Test Dovecot POP3 dan IMAP4
/etc/init.d/dovecot restart
root@budi-desktop:~# telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
+OK Dovecot ready.
user admin@beruk.com
+OK
pass 12345
+OK Logged in.
list
+OK 2 messages:
1 562
2 619
.
quit
+OK Logging out.
Connection closed by foreign host.
root@budi-desktop:~#


SMTP SASL AUTHENTICATION
apt-get install sasl2-bin libsasl2-modules-sql cyrus-clients-2.2
vim /etc/postfix/main.cf
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service
# modify the existing smtpd_sender_restrictions
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,
reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
# then add these
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =

vim /etc/postfix/sasl/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: postfixpassword
sql_database: postfix
sql_select: select passwd from mailbox where username='%u@%r' and active = 1

Sabtu, 04 Juli 2009

Openoffice 3.0 Google Documents Extension

Pada blog kali ini kita akan bahas cara upload file pekerjaan ke Google dokumen, sehingga kita bisa sharing file melalui internet dengan pengguna email google maupun yang lain.

1. Langkah pertama adalah download google document extension di
http://extensions.services.openoffice.org/project/ooo2gd

2. Kemudian install melalui extension manager, Tools -> Extension Manager -> Add

3. Langkah berikutnya buka dokumen yang akan kita upload

4. Klik icon upload Google Docs pada openoffice isikan username dan password kemudian OK.

5. Buka Google Docs melalui web browser firefox kemudian klik list file yang kita simpan, sehingga tampil editor google dokumen.

Jumat, 03 Juli 2009

Solusi Login YM dari pidgin linux...

Kalian pasti mengalami masalah ketika login ke Yahoo Messenger melalui Pidgin linux. Ini ada solusi dengan mengganti alamat URL default YM ke alamat baru server China.

Alamat baru: cn.scs.msg.yahoo.com

Atau bisa lihat di gambar bawah ini:

Rabu, 17 Juni 2009

Membuat Ubuntu LiveUSB





Cara membuat remastering Ubuntu LiveCD telah kita bahas di bab sebelumnya. Sekarang kita akan membuat LiveUSB dari Flashdisk standar yang ada dipasaran, dengan menggunakan Ubuntu LiveUSB kita terhindar dari gagal instalasi karena media cacat (tergores, terbentur dll) seperti yang terdapat pada LiveCD, komputer masa kini mendukung boot melalui USB Flashdisk. Cara membuat cukup mudah dengan langkah sebagai berikut:

Instalasi aplikasi boot utility
apt-get install lilo grub mtools syslinux

Persiapan perangkat keras
1. Hapus partisi USB Flashdisk dan buat partisi baru

2. Buat partisi pada Flashdisk dengan option boot agar bisa dibooting pakai PC.


3. Format partisi Flashdisk dengan filesystem vfat / fat32 melalui ubuntu.

4. Mount partisi Flashdisk ke /mnt

5. Mount ISO LiveCD ke /media/cdrom

6. Salin isi ISO LiveCD ke Flashdisk

Pembuatan pilihan menu dan boot loader
1. Edit file syslinux.cfg pada Flashdisk

vim /mnt/syslinux.cfg

DEFAULT live
LABEL live
menu label Start or install Ubuntu
kernel boot/vmlinuz
append boot=casper BOOT=casper initrd=boot/initrd.gz ramdisk_size=1048576 root=/dev/ram rw --


2. Aktifkan pilihan menu

syslinux /dev/sda1



3. Buat boot loader USB Flashdisk
lilo -M /dev/sda

4. Tinggal rubah setup BIOS booting ke USB Flashdisk

Ngantuk mau tidur dulu ... terusin besok ya

Sabtu, 13 Juni 2009

Alokasi Static IP OpenVPN Client

Di sini kita akan bahas cara membuat statik IP OpenVPN Client, ok dech udah malam ... langsung aja !!!

1. Tambahkan settingan /etc/openvpn/server.conf parameter ..
client-config-dir /etc/openvpn/ccd
2. Buat direktori /etc/openvpn/ccd
mkdir /etc/openvpn/ccd
3. Buat file client untuk alokasi Static IP OpenVPN Client
vim /etc/openvpn/ccd/client3
ifconfig-push 10.8.1.21 255.255.255.0
4. Lengkapnya adalah sebagai berikut:
root@aples-desktop# tree /etc/openvpn/ccd/
/etc/openvpn/ccd/
|-- c315
|-- cibitung
|-- client3
|-- greataja
|-- hip3
`-- teladan
5. Restart openVPN server
/etc/init.d/openvpn restart


6. Restart OpenVPN Client (posisi saya di client3)
root@ubuntu:~# /etc/init.d/openvpn restart
root@ubuntu:~# ifconfig tap0
tap0 Link encap:Ethernet HWaddr 00:ff:a7:fc:83:15
inet addr:10.8.1.21 Bcast:10.8.1.255 Mask:255.255.255.0
inet6 addr: fe80::2ff:a7ff:fefc:8315/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1628 (1.5 KB) TX bytes:3818 (3.7 KB)

Workshop OpenVPN & MPLS Virtual WAN .. klik
www.ardelindo.com

Sabtu, 06 Juni 2009

Report Ardelindo Blog Tutorial via Google Analytics

Linuxer ini ada sedikit info buat pengembang website yang ingin memantau akses situs kita, google menyediakan fasilitas namanya Google Analytics. Fitur yang diberikan cukup komplit, kita bisa melihat negara, kota, content terbanyak diakses bahkan sampai keyword. Untuk ardelindo.blogspot.com belum terkumpul banyak karena baru kami buat.

MPLS Virtual WAN Mobile Internet Broadband Access



Pada blog sebelumnya kita membahas konfigurasi MPLS Virtual WAN, dengan memanfaatkan VPN bridging dan Routing BGP. Sekarang kita membahas akses MPLS Virtual WAN melalui mobile internet broadband access (Ex: Smart Telecom Internet Unlimited 153kbps), untuk menghubungi komputer yang berada di subnet ardelindo (192.168.0.0/24), ruang pelatihan (192.168.3.0/24) dan customer (192.168.1.0/24).

Datacenter customer dan ardelindo datacenter adalah storage penyimpanan data terpusat, jadi saya bisa setiap saat mengambil file yang diperlukan agar bisa dikerjakan dirumah. Kedua saya juga bisa melakukan remote maintenance walaupun sedang berada diluar kantor.
Lokasi saya berada di perumahan bukit rivaria sawangan - depok, yang saya gunakan Personal Computer rakitan, terhubung langsung ke HP nokia 2865 melalui kabel DKU-2. Device ppp0 adalah perangkat yang dibuat linux otomatis saat kita terhubung ke jaringan Smart Telecom Internet Unlimited. Alamat IP VPN adaah sebagai berikut:

Rumah Sawangan
root@ubuntu:~# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.10.54.194 P-t-P:10.17.4.12 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1000 Metric:1
RX packets:4284 errors:1 dropped:0 overruns:0 frame:0
TX packets:4492 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1615893 (1.5 MiB) TX bytes:612388 (598.0 KiB)

Kantor Ardelindo
root@aples-desktop:~# ifconfig tap0
tap0 Link encap:Ethernet HWaddr 00:ff:1c:6b:97:d1
inet addr:10.8.1.1 Bcast:10.8.1.255 Mask:255.255.255.0
inet6 addr: fe80::2ff:1cff:fe6b:97d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:762478 errors:0 dropped:0 overruns:0 frame:0
TX packets:844504 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:71179776 (67.8 MB) TX bytes:77438801 (73.8 MB)

Customer ABCDE
root@ubuntu:~# ifconfig tap0
tap0 Link encap:Ethernet HWaddr 00:ff:c7:6f:74:d5
inet addr:10.8.1.4 Bcast:10.8.1.255 Mask:255.255.255.0
inet6 addr: fe80::2ff:c7ff:fe6f:74d5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:103107 errors:0 dropped:0 overruns:0 frame:0
TX packets:55442 errors:0 dropped:99 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:7824984 (7.4 MB) TX bytes:4262522 (4.0 MB)


Pengujian koneksi
Setelah semua terhubung ke jaringan VPN, kita lakukan test koneksi dengan ICMP melalui PC Desktop rumah sawangan.
root@ubuntu:~# ping 10.8.1.1
PING 10.8.1.1 (10.8.1.1) 56(84) bytes of data.
64 bytes from 10.8.1.1: icmp_seq=2 ttl=64 time=527 ms
64 bytes from 10.8.1.1: icmp_seq=3 ttl=64 time=543 ms
64 bytes from 10.8.1.1: icmp_seq=4 ttl=64 time=559 ms

--- 10.8.1.1 ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3007ms
rtt min/avg/max/mdev = 527.763/543.808/559.862/13.118 ms

root@ubuntu:~# ping 10.8.1.4
PING 10.8.1.4 (10.8.1.4) 56(84) bytes of data.
64 bytes from 10.8.1.4: icmp_seq=3 ttl=64 time=585 ms
64 bytes from 10.8.1.4: icmp_seq=4 ttl=64 time=586 ms
64 bytes from 10.8.1.4: icmp_seq=6 ttl=64 time=606 ms

--- 10.8.1.4 ping statistics ---
6 packets transmitted, 3 received, 50% packet loss, time 5010ms
rtt min/avg/max/mdev = 585.956/593.302/606.980/9.720 ms

dari hasil diatas kita lihat bahwa semua sudah terhubung dengan jaringan VPN.

Konfigurasi Routing BGP
Nah sekarang kita lakukan konfigurasi routing BGP untuk menghubungkan subnet kantor ardelindo, ruang pelatihan dan customer. Dalam contoh ini saya hanya perlihatkan settingan BGP nya, untuk keterangan lebih detail lihat di tutorial MPLS Virtual WAN.
Kantor Ardelindo
root@ubuntu:~# telnet 10.8.1.1 bgpd
bgpd> enable
bgpd# configure terminal
bgpd(config)# show running-config
router bgp 1001
bgp router-id 10.8.1.1
network 10.8.1.0/24
network 122.200.50.0/24
network 192.168.0.0/24
neighbor 10.8.1.4 remote-as 1005
neighbor 10.8.1.13 remote-as 1008
neighbor 192.168.0.90 remote-as 1001
neighbor 192.168.0.253 remote-as 1001

Customer ABCDE
root@ubuntu:~# telnet 10.8.1.4 bgpd
bgpd# show running-config
router bgp 1005
bgp router-id 10.8.1.4
network 192.168.1.0/24
neighbor 10.8.1.1 remote-as 1001
neighbor 10.8.1.13 remote-as 1008

Rumah Sawangan
root@ubuntu:~# telnet 127.0.0.1 bgpd
bgpd# show running-config
router bgp 1008
bgp router-id 10.8.1.13
neighbor 10.8.1.1 remote-as 1001
neighbor 10.8.1.4 remote-as 1005

Routing Table BGP
Kemudian setelah terhubung kita lihat routing table melalui zebra dan bgpd.
Rumah Sawangan
root@ubuntu:~# telnet 127.0.0.1 zebra
Router> show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
K>* 0.0.0.0/0 is directly connected, ppp0
B 10.8.1.0/24 [20/0] via 10.8.1.1 inactive, 01:26:21
C>* 10.8.1.0/24 is directly connected, tap0
C>* 10.17.4.12/32 is directly connected, ppp0
B>* 122.200.50.0/24 [20/0] via 10.8.1.1, tap0, 01:26:21
C>* 127.0.0.0/8 is directly connected, lo
K * 169.254.0.0/16 is directly connected, eth0 inactive
B>* 192.168.0.0/24 [20/0] via 10.8.1.1, tap0, 01:26:21
B>* 192.168.1.0/24 [20/0] via 10.8.1.4, tap0, 01:24:26
S>* 192.168.1.99/32 [1/0] via 10.8.1.4, tap0
S>* 192.168.1.100/32 [1/0] via 10.8.1.4, tap0
Interface tap0 : perangkat VPN bridging

root@ubuntu:~# telnet 127.0.0.1 bgpd
bgpd> show ip bgp
BGP table version is 0, local router ID is 10.8.1.13
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.8.1.0/24 10.8.1.1 0 0 1001 i
*> 122.200.50.0/24 10.8.1.1 0 0 1001 i
*> 192.168.0.0 10.8.1.1 0 0 1001 i
*> 192.168.1.0 10.8.1.4 0 0 1005 i
*> 192.168.6.0 10.8.1.2 0 1001 1003 i
*> 192.168.10.0 10.8.1.2 0 1001 1003 i
Total number of prefixes 6

bgpd> show ip bgp neighbors
BGP neighbor is 10.8.1.1, remote AS 1001, local AS 1008, external link
BGP version 4, remote router ID 10.8.1.1
BGP state = Established, up for 01:18:43
Last read 00:00:43, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Received 179 messages, 0 notifications, 0 in queue
Sent 180 messages, 1 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds

For address family: IPv4 Unicast
Community attribute sent to this neighbor(both)
7 accepted prefixes

bgpd> show ip bgp summary
BGP router identifier 10.8.1.13, local AS number 1008
3 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.8.1.1 4 1001 181 183 0 0 0 01:20:39 7
10.8.1.4 4 1005 176 188 0 0 0 01:21:32 1
Total number of neighbors 2

root@ubuntu:~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.99 10.8.1.4 255.255.255.255 UGH 0 0 0 tap0
192.168.1.100 10.8.1.4 255.255.255.255 UGH 0 0 0 tap0
10.17.4.12 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.6.0 10.8.1.2 255.255.255.0 UG 0 0 0 tap0
192.168.4.0 10.8.1.1 255.255.255.0 UG 0 0 0 tap0
122.200.50.0 10.8.1.1 255.255.255.0 UG 0 0 0 tap0
192.168.3.0 10.8.1.1 255.255.255.0 UG 0 0 0 tap0
192.168.0.0 10.8.1.1 255.255.255.0 UG 0 0 0 tap0
10.8.1.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
192.168.10.0 10.8.1.2 255.255.255.0 UG 0 0 0 tap0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
Interface tap0 : perangkat VPN bridging


Kantor Ardelindo
root@ubuntu:~# telnet 10.8.1.1 zebra
Router> show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
K>* 0.0.0.0/0 via 122.200.52.1, eth1
C>* 10.8.1.0/24 is directly connected, tap0
C>* 10.8.10.0/24 is directly connected, tap1
C>* 122.200.52.0/25 is directly connected, eth1
C>* 127.0.0.0/8 is directly connected, lo
C>* 192.168.0.0/24 is directly connected, eth3
K>* 192.168.0.63/32 via 10.8.1.5, tap0
K>* 192.168.0.218/32 via 10.8.1.5, tap0
B>* 192.168.1.0/24 [20/0] via 10.8.1.4, tap0, 01:25:44
S>* 192.168.1.99/32 [1/0] via 10.8.1.4, tap0
S>* 192.168.1.100/32 [1/0] via 10.8.1.4, tap0

root@ubuntu:~# telnet 10.8.1.1 bgpd
bgpd> show ip bgp
BGP table version is 0, local router ID is 10.8.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.8.1.0/24 0.0.0.0 0 32768 i
*> 122.200.50.0/24 0.0.0.0 0 32768 i
*> 192.168.0.0 0.0.0.0 0 32768 i
*> 192.168.1.0 10.8.1.13 0 1008 1005 i
*>i192.168.3.0 192.168.0.253 0 100 0 i
*>i192.168.4.0 192.168.0.253 0 100 0 i
*> 192.168.6.0 10.8.1.2 0 0 1003 i
*> 192.168.10.0 10.8.1.2 0 0 1003 i
Total number of prefixes 8

bgpd> show ip bgp summary
BGP router identifier 10.8.1.1, local AS number 1001
RIB entries 15, using 960 bytes of memory
Peers 8, using 20 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.8.1.2 4 1003 1915 1970 0 0 0 1d02h09m 2
10.8.1.4 4 1005 7162 7391 0 0 0 2d12h46m Idle
10.8.1.12 4 1007 82 121 0 0 0 5d03h37m Active
10.8.1.13 4 1008 1237 1387 0 0 0 01:24:49 1
192.168.0.90 4 1001 148 153 0 0 0 2d05h02m Active
192.168.0.253 4 1001 2894 2942 0 0 0 00:07:48 2
Total number of neighbors 6


Customer ABCDE
root@ubuntu:~# telnet 10.8.1.4 zebra
Router> show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
K>* 0.0.0.0/0 via 192.168.0.2, eth3
B 10.8.1.0/24 [20/0] via 10.8.1.1 inactive, 01:27:16
C>* 10.8.1.0/24 is directly connected, tap0
B>* 122.200.50.0/24 [20/0] via 10.8.1.1, tap0, 01:27:16
C>* 127.0.0.0/8 is directly connected, lo
K>* 169.254.0.0/16 is directly connected, eth1
B 192.168.0.0/24 [20/0] via 10.8.1.1, tap0, 01:27:16
C>* 192.168.0.0/24 is directly connected, eth3
S>* 192.168.0.71/32 [1/0] via 10.8.1.2, tap0
S>* 192.168.0.253/32 [1/0] via 10.8.1.2, tap0
C>* 192.168.1.0/24 is directly connected, eth1

root@ubuntu:~# telnet 10.8.1.4 bgpd
bgpd> show ip bgp
BGP table version is 0, local router ID is 10.8.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.8.1.0/24 10.8.1.13 0 1008 1001 i
*> 122.200.50.0/24 10.8.1.13 0 1008 1001 i
*> 192.168.0.0 10.8.1.13 0 1008 1001 i
*> 192.168.1.0 0.0.0.0 0 32768 i
*> 192.168.3.0 10.8.1.13 0 1008 1001 i
*> 192.168.4.0 10.8.1.13 0 1008 1001 i
*> 192.168.6.0 10.8.1.13 0 1008 1001 1003 i
*> 192.168.10.0 10.8.1.13 0 1008 1001 1003 i
Total number of prefixes 8

bgpd> show ip bgp summary
BGP router identifier 10.8.1.4, local AS number 1005
RIB entries 15, using 960 bytes of memory
Peers 3, using 7536 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.8.1.1 4 1001 5868 7357 0 0 0 2d12h52m Idle
10.8.1.13 4 1008 693 712 0 0 0 01:31:35 7
Total number of neighbors 2

Pengujian koneksi antar subnet
Dari hasil routing diatas bisa kita simpulkan sekarang semua subnet sudah terhubung. Untuk meyakinkan kita lakukan test ICMP dari PC rumah sawangan ke setiap server yang ada pada gambar topologi diatas.

Ke Kantor Ardelindo
root@ubuntu:~# ping 192.168.0.71 (Ardelindo Datacenter)
PING 192.168.0.71 (192.168.0.71) 56(84) bytes of data.
64 bytes from 192.168.0.71: icmp_seq=2 ttl=64 time=509 ms
64 bytes from 192.168.0.71: icmp_seq=4 ttl=64 time=609 ms
64 bytes from 192.168.0.71: icmp_seq=5 ttl=64 time=530 ms

root@ubuntu:~# ping 192.168.0.3 (Ardelindo IP Phone)
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=1 ttl=63 time=1130 ms
64 bytes from 192.168.0.3: icmp_seq=2 ttl=63 time=685 ms
64 bytes from 192.168.0.3: icmp_seq=3 ttl=63 time=681 ms


Ke Customer ABCDE
root@ubuntu:~# ping 192.168.1.100 (Datacenter)
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=63 time=585 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=63 time=628 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=63 time=606 ms

root@ubuntu:~# ping 192.168.1.102 (Application Server)
PING 192.168.1.102 (192.168.1.102) 56(84) bytes of data.
64 bytes from 192.168.1.102: icmp_seq=1 ttl=63 time=643 ms
64 bytes from 192.168.1.102: icmp_seq=2 ttl=63 time=601 ms
64 bytes from 192.168.1.102: icmp_seq=3 ttl=63 time=1398 ms

root@ubuntu:~# ping 192.168.1.99 (Webmail)
PING 192.168.1.99 (192.168.1.99) 56(84) bytes of data.
64 bytes from 192.168.1.99: icmp_seq=1 ttl=64 time=572 ms
64 bytes from 192.168.1.99: icmp_seq=2 ttl=64 time=589 ms
64 bytes from 192.168.1.99: icmp_seq=3 ttl=64 time=625 ms

root@ubuntu:~# ping 192.168.1.103 (Backup Server)
PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
64 bytes from 192.168.1.103: icmp_seq=1 ttl=63 time=801 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=63 time=685 ms
64 bytes from 192.168.1.103: icmp_seq=3 ttl=63 time=644 ms
64 bytes from 192.168.1.103: icmp_seq=4 ttl=63 time=843 ms

Akses Ardelindo dan Customer ABCDE
Sekarang kita lakukan akses secara nyata menggunakan nautilus untuk mengambil data yang ada di ardelindo dan customer, serta melakukan akses webmail secara lokal.

Koneksi ke Ardelindo Datacenter

Koneksi Ke Ardelindo Hotspot Management


Koneksi Ke Customer ABCDE

Linux Training: www.ardelindo.com

Internet Paket Smart Nokia 2865 Ubuntu


Perangkat Koneksi Internet

Paket Smart: Nokia 2865
Harga : Rp. 900.000,- (tidak termasuk kabel DKU-2)

Fasilitas:
Gratis : Paket Internet 12GByte selama 6 Bulan
tiap bulan dapat 2 GByte
speed 32kbps (setelah saya test)
klo mau cepet update ke paket internet unlimited

Paket Pulsa Rp. 120.000,- selama 6 Bulan
tiap bulan dapat pulsa Rp. 20.000,-

Perangkat Koneksi Komputer
Jenis : Kabel USB DKU-2 Original
Harga : Rp. 150.000,-

Sistem Operasi
Linux : Ubuntu Feisty - Jaunty
Aplikasi : wvdial

Instalasi wvdial
apt-get install wvdial

Deteksi Nokia 2865 CDMA
root@ubuntu:~# lsusb
Bus 002 Device 003: ID 058f:6387 Alcor Micro Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 006: ID 0421:04dc Nokia Mobile Phones
Bus 001 Device 002: ID 046d:c019 Logitech, Inc.
Bus 001 Device 001: ID 0000:0000

Konfigurasi wvdial
root@ubuntu:~# wvdialconf
Modem Port Scan<*1>: S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Nokia
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

root@ubuntu:~# vim /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = smart
Phone = #777
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Username = smart
; Phone =
; Password =
; Username =

Jalankan wvdial
root@ubuntu:~# wvdial
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
~[7f]}#@!}!}!} }9}"}&} } } } }#}%B#}%}%}&} ] D}'}"}(}"6i~
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}"} }9}"}&} } } } }#}%B#}%}%}&} ]Dj}'}"}(}"N}2~
--> PPP negotiation detected.
--> Starting pppd at Sat Jun 6 03:36:09 2009
--> Pid of pppd: 28971
--> Using interface ppp0
--> pppd: �[08][06][08]�[0c][06][08]
--> pppd: �[08][06][08]�[0c][06][08]
--> pppd: �[08][06][08]�[0c][06][08]
--> pppd: �[08][06][08]�[0c][06][08]
--> local IP address 10.10.7.195
--> pppd: �[08][06][08]�[0c][06][08]
--> remote IP address 10.17.4.12
--> pppd: �[08][06][08]�[0c][06][08]
--> primary DNS address 10.17.3.254
--> pppd: �[08][06][08]�[0c][06][08]
--> secondary DNS address 202.43.178.245
--> pppd: �[08][06][08]�[0c][06][08]

Test koneksi internet
root@ubuntu:~# ping www.yahoo.com
PING www-real.wa1.b.yahoo.com (209.131.36.158) 56(84) bytes of data.
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=1 ttl=47 time=599 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=2 ttl=47 time=599 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=3 ttl=47 time=599 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=4 ttl=47 time=599 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=5 ttl=47 time=599 ms
64 bytes from f1.www.vip.sp1.yahoo.com (209.131.36.158): icmp_seq=6 ttl=47 time=579 ms

SELAMAT BER INTERNET RIA
www.ardelindo.com

Jumat, 05 Juni 2009

Simple Network Management Protocol

Kalian Network Administrator pasti pernah membaca tentang SNMP (Simple Network Management Protocol), baik pada sistem operasi linux maupun perangkat keras seperti router atau access point.

Apakah SNMP itu ?
Simple Network Management Protocol (SNMP) merupakan protokol standard industri yang digunakan untuk memonitor dan mengelola berbagai perangkat di jaringan Internet meliputi hub, router, switch, workstation dan sistem manajemen jaringan secara jarak jauh (remote).
Referensi: ID Wikipedia

Data apa saja yang diberikan oleh SNMP ?
Banyak data mengenai perangkat dan sistem, kita bisa memantau sumber daya perangkat (beban memory, cpu, system, kapasitas hardisk / partisi, temperatur MotherBoard terintegrasi LM Sensor dll). Yang paling penting kita bisa mengetahui lalu lintas data (trafik) pada router, access point dan modem adsl.
Data SNMP via tools SCLI (SNMP Client Interface)
root@ubuntu:~# scli 202.45.xxx.xxx rahasia
100-scli version 0.2.12 (c) 2001-2002 Juergen Schoenwaelder
100-scli trying SNMPv2c ... good
(202.45.xxx.xxx) scli > show system info
Name: aples-desktop
Address: 202.45.xxx.xxx:161
Description: Internet Gateway
Contact: Budi Santoso (info@ardelindo.com)
Location: PT. Ardelindo APles
Vendor: NET-SNMP
Current Time: 2009-06-05 23:54:58 +07:00
Agent Boot Time: 2009-05-23 09:58:29 +07:00
System Boot Time: 2009-05-23 09:58:16 +07:00
System Boot Args: root=UUID=e0a07def-9109-4beb-87c7-e3de1bb3c579 ro quiet splash
Users: 1
Processes: 122
Memory: 471M
Interfaces: 7
Interface Swap: 2009-05-30 18:43:40 +07:00

(202.45.xxx.xxx) scli > show system storage
INDEX DESCRIPTION TYPE SIZE USED FREE USE%
1 Physical memory ram 471M 439M 31M 93
3 Virtual memory virtual memory 3068M 911M 2156M 29
6 Memory buffers other
7 Cached memory other
8 Shared memory other
10 Swap space virtual memory 2596M 471M 2124M 18
31 / fixed disk 9G 2783M 7372M 27
32 /home fixed disk 31G 21G 9G 68
33 /var fixed disk 29G 24G 5337M 82
34 /var/www/jaunty removable disk 697M 697M ----- 100
35 /tambahan fixed disk 18G 10G 7870M 58
36 /var/www/ubuntu removable disk 697M 697M ----- 100

(202.45.xxx.xxx) scli > show interface stats
INTERFACE STATUS I-BPS O-BPS I-PPS O-PPS I-ERR O-ERR DESCRIPTION
1 UU-N ---- ---- ---- ---- ---- ---- lo
2 UUCN ---- ---- ---- ---- ---- ---- eth3
3 UUCN ---- ---- ---- ---- ---- ---- eth1
4 DDCN ---- ---- ---- ---- ---- ---- eth2
6 DDCN ---- ---- ---- ---- ---- ---- tun0
10 UUCN ---- ---- ---- ---- ---- ---- tap0
13 UUCN ---- ---- ---- ---- ---- ---- tap1

Perangkat apa yang memiliki fasilitas SNMP ?
Perangkat keras (hardware) jaringan komputer masa kini kebanyakan menambahkan fasilitas snmp untuk memantau sumber daya (resource) maupun trafik yang melintasi perangkat. Dengan adanya perangkat beban trafik paket data kita bisa pantau melalui aplikasi NMS (Network Management System) seperti CACTI.

Kita juga bisa memantau trafik paket data yang melintasi Linux Internet Gateway dengan memasang aplikasi Net SNMP dan memantau statistiknya pada NMS CACTI.

Wireless Access Point

Modem ADSL

PC Router Linux Net-SNMP

Network Management System
Kita bisa memantau trafik pada setiap perangkat yang terpasang pada jaringan LAN maupun internet, perangkat tersebut kita hubungkan dengan aplikasi NMS CACTI dan MRTG (Multi Router Traffic Grapher). NMS bertugas untuk menyimpan data, melakukan analisa (perhitungan) dan menampilkan dalam bentuk grafis, sehingga mudah dipantau oleh pengguna biasa serta network administrator. Diagram dibawah ini menggambarkan hubungan perangkat yang didukung oleh fasilitas SNMP dengan NMS MRTG (MRTG sekarang digantikan oleh CACTI karena kurang fitur).





CACTI Network Management System


Instalasi Net SNMP
Cara instalasi Net SNMP pada Ubuntu sangat mudah, setelah kita konfigurasi repository, jalankan perintah.

apt-get install snmpd snmp scli

Kemudian konfigurasi file /etc/snmp/snmpd.conf

Konfigurasi Net-SNMP
#/usr/local/etc/snmp/snmpd.conf
# define RO community
rocommunity public
rwcommunity budi

# First, map the community name "public" into a "security name"
# sec.name source community
com2sec public default public
com2sec budi localhost budi

####
# Second, map the security name into a group name:
# groupName securityModel securityName
group public v1 public
group public v2c public
group public usm public

access notConfigGroup "" any noauth exact systemview none none
view all included .1 80
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
sysdescr "Internet Gateway PT. ARDELINDO”
syscontact Administrator (budi11@graffiti.net)
sysname Mandrake 10.0
syslocation Depok 2006

Query snmp
Query SNMP diperlukan untuk mengetahui hasil dari konfigurasi Net-SNMP.

[root@mandrake root]# snmpwalk -v 2c localhost -c public interface
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1

[root@mandrake root]# snmpget -v 2c localhost -c public IF-MIB::ifOutOctets.2
IF-MIB::ifOutOctets.2 = Counter32: 12039726
SNMP Translate
snmptranslate -Tt|less
snmptranslate -To|less
snmptranslate -Onf -IR sysDescr
snmptranslate -On -IR sysDescr
snmptranslate -Tl | head
snmptranslate -Ta | head