Recently, I need to understand how Radius works, so I build a simple Radius server to learn how radius works. The setup here is fairly a basic setup. My goal is just to make a simple radius server up and running.
After a googling session, I decide to use freeradius as the Radius Server. Lets start,
Because I'm using cent=os, of course my best option in installing free radius is using yum. So I started to check waht freeradius package is available in yum repositories
[trixbox1.localdomain ~]# yum search radius
=============================== Matched: radius ================================
freeradius.i386 : High-performance and highly configurable free RADIUS server.
freeradius-mysql.i386 : MySQL bindings for freeradius
freeradius-postgresql.i386 : postgresql bindings for freeradius
freeradius-unixODBC.i386 : unixODBC bindings for freeradius
perl-Authen-Radius.noarch : Perl module that provides simple Radius client
: facilities
Hmm, good, there is freeradius in the default repositories. So I just install the freeradius,
# yum install freeradius.i386
I also need to install freeradius-mysql.i386 to enable mysql support in the radius configuration. I am using mysql to stored the username/password database.
# yum install freeradius-mysql.i386
In this setup, I have already installed mysql database (if you don't, please do so first), so the next step is to configure the mysql database.
# mysql -u root -p
Enter password: *****
mysql>create database radius
mysql>exit
Next, import the mysql database example from /usr/share/doc/freeradius-1.1.3/examples/mysql.sql
# mysql -u root -p radius < /usr/share/doc/freeradius-1.1.3/examples/mysql.sql
The database is now populated with the data in the mysql.sql file. Populate the username information into the database, in my sql prompt, you can use this to insert username a and password: passt to the database
mysql> use radius
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('a', 'Password', 'passt');
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('a', 'Auth-Type', 'Local');
Next step is to configure freeradius to connect to mysql radius database. We need to edit configuration file in /etc/raddb. Don't forget to backup all the file in this directory before you change anything, in case you messed up the configuration.
The first configuration file we edit is sql.conf. Make sure the information the reflect the mysql database configuration.
Next, edit clients.conf. Edit the secret key as you wished.
Next, edit radius.conf file. Make sure you uncomment sql attributes in accounting and authorize section. Also, uncomment the $INCLUDE ${confdir}/sql.conf line.
The configuration is done, you now can test the radius server using
#/usr/sbin/radiusd -X.
You can locally test the radius server using this command
# radtest a passt localhost 1812 secret_key
or to simulate NAS Client and the user you can use NTRadPing or Radeaptest in windows environment.
Thats all folks.
more ...
2/13/10
FreeRadius configuration di CentOS 5.3
12/1/09
1 Tahun di Telkomsel
Hari ini, tepat satu tahun di Telkomsel.
Gak terasa, cepat banget waktu berlalu...
more ...
8/12/09
Run USB 3G Modem from Linux Ubuntu
Most USB modem nowadays have dual mode. First it act as storage-drive which enable users to install the modem flawlessly. After it installed, it then change mode to 3G Modem. Unfortunately, this does not works well in Linux system. Most of recent Linux distribution can be used to run 3G modem without having to install driver.
This dual made system make users confuses when using wvdial to connect to the internet. wvdial will not detect a serial modem even if users plug the modem properly. To make the usb modem recognized as a modem (not storage) we need to manually detach the usb modem as a storage (or you can automate it using usb_modeswitch - http://www.draisberghof.de/usb_modeswitch/ - maybe I'll try to explain how to use this tools later)
To do this manually, all you have to do is unmount the usb, remove the usb-storage and usbserial module, then reinstate the module. This is how you do it ubuntu.
1. Unmount the usb modem. You can achieve this by right clicking the usb icon in the desktop and klik eject. But, if you like me, you will like more straightforward technique using the terminal by using unmount command.
# unmount /media/xxxx
2. Remove the usbserial and usb-storage module. Before you remove it run the lsusb command first to check the vendor and the product id of the usb modem (act as storage). This is useful as reference for the 3rd step.
# modprobe -r usb-storage
# modprobe -r usbserial
3. Reinstate the modul back using the correct vendor-id and product-id. To get vendor and product id you can use lsusb command. Compare it with the first lsusb command you issue. There should be a change of value in one of the usb devices. The vendor id will be the same, but the produt id is different.
# modprobe usbserial vendor=0x0xxxx product=0x0xxxx
4. Done. The modem will be recognized as a serial modem. You should now can use your usb modem. Use your favourite dialer such as wvdial. Youcan use wvdialconf to verify whether your usb modem is detected properly. Example of wvdial configuration as follows.
============
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyUSB0
Username =
Password =
Baud = 9600
[Dialer Telkomsel]
Init3 = AT+CGDCONT=1,"IP","internet"
Phone= *99#
Username = – (whatever you want)
Password = – (whatever you want)
==============
You than can connect to the internet by using wvdial command
#wvdial telkomsel
more ...
Label: Linux Networking
DOS batch script to modify windows task scheduler
Recently I was annoyed by one rules which force me to get into the office on time. So I made a little script to automate my attendance. I then scheduled the script to run at a specified time. To make the scheduled time a little random I made a second simple script that change the scheduled tasks so the first script will run at random time from 7:10 to 7:49.
This is the script
====================
REM Script for change schedule
SCHTASKS /Delete /TN attend_in_khairil /F
REM attend_in_khairil
set /a menit_kiri_khairil=%random% %% 4 + 1
set /a menit_kanan_khairil=%random% %% 9
schtasks /create /RU DOMAIN\Username /RP Password /TN attend_in_khairil /TR "D:\absen\absen_in_khairil.bat" /ST 07:%menit_kiri_khairil%%menit_kanan_khairil%:00 /SC WEEKLY /D MON,TUE,WED,THU,FRI /SD 08/01/2009
====================
Simple huh ... I then just schedule this script to run everyday.
This way I will never be late at the office, hehehehe.
more ...
Label: Scripting
4/21/09
Thinking about future
It's been a long time since my last interaction with this blog. I really don't have idea what to write. Really no idea at all.
My first mission in creating this blog is to learn how to write. Expressing my idea in a writing world seems to be a good habit. I also want to make this blog as a tools in documenting my life. So I can remember what have I done in the past and what should I do in the future.
Now it seems so difficult to write. Don't know why, but it's difficult. I don't think it is beacause of lack of time, I think I do have time if I really want to update this blog. The problem is I don't know what to write....
more ...
Label: Daily Life
1/2/09
12/16/08
Blackberry Technology
From a technology that enable top executives receive their email directly and in real time, it has become a nice little gadget for everyone. A nice little gadget...
This article will provide you with the high level overview of what is blackberry and how it works. Hopefully this will give insight of the technology.
Blackberry is a hand-held made by Research in Motion (RIM), a Canada based company founded in 1984. RIM itself is a manufacturer of wireless solutions.
What makes blackberry famous is it capabilities to get email directly. If your hand-held is set correctly you can receive email directly without touching a single button. It's like SMS but more complicated. This technology is commonly refers to push mail. There is another email technology which is more familiar to us, non-executive, :) called pull mail.
In pull mail schema there are two component: mail client (outlook, thunderbird, etc) and mail server (exchange, postfix, etc). The client periodically check the server of incoming mail. If there is new email the client will pull them from the server to its local directory. That's why it is called pull email. In a push mail technology, server will automatically push the incoming email to the client without waiting any request from the client. This methods enable email to be received directly and real time.
The ilustration of pull and push mail is as follows.
(on progress)
After ilustrating the basic of email system, I now will dig deeper on blackberry technology. For blackberry to work there are some important component to add to existing mail infrastructure. This component is varied and depends on what blackberry technology you use. There are two services that RIM offers: BES (Blackberry Enterprise Service) and BIS (Blackberry Internet Service).
BES (Blackberry Enterprise Service)
(to be continue...)
more ...
Label: Blackberry
It start to be interesting ...
Yep, after 2 weeks of reading raw material, now I'm going to dig the real world deeper. From now on everything will start to be interesting. My boss have assigned me some project, and it makes me understand more about what will I be doing. For the past 9 month my job is always learn, learn, and learn. It's fun to learn, but sometimes it is kind of boring. Now it's time to do some action.
Aside of the project I also need to master every technical concept that my department deals with. There are so many topics that I need to learn. Hopefully I can understand all at the end of my probation.
My material consist of:
1. ATM over GPRS
2. EDC over GPRS
3. Small and Remote Office Connectivity
4. Telemetry Application
5. Mobile Tracking
6. Blackberry Enterprise Service
7. Blackberry Internet Services
8. Blackberry Connect
9. Microsoft Direct Push
10. Sales Force Automation
11. Internet Application Access
12. Prepaid TopUp
13. SMS Broadcast
14. NSP for corporate
15. Mobile VPN
16. Fixed Wireless Connectivity
17. Halo Bebas Corporate
18. Closed User Group
19. Bulk Data Package
20. Bulk SMS Package
21. Telkomsel Flash
22. Video Conference
23. Video Surveillance
By the end of my Probation I'm expected to know all of this technical stuff. It should be challenging. Let see, I have 70 days to go...
more ...
Label: Telkomsel Probation
12/9/08
NPWP
Berdasarkan pengumuman dari pajak.go.id yang menyatakan bahwa kantor pajak melayani masyarakat hari Sabtu, Sabtu, 6 Desember, gw datang ke KPP Pratama Depok dengan niat baik ingin mengurus NPWP pribadi. Guess what? Orang pajaknya bilang NPWP-nya gak bisa di urus, harus hari kerja biasa, dengan sejuta alasan yang gak masuk akal. Huhhh. Jadi malas nih ngikutin pertaruran. Dah capek-capek ke kantor pajak, malah dimentahin.
Terus hari ini, Selasa, ketemu temen kantor yang ternyata bisa ngurus Pajak di kantor pajak didekat tempat dia tinggal, juga hari Sabtu kemaren. Huuhhhh. Gimana sih nih kantor Pajak. Sosialisasi peraturan tapi kok gak dilaksanakan ya... Apa kata dunia?
more ...
Label: Telkomsel Probation
12/3/08
My Third Day
I am told to read anything related to my job. That's all I have to do now. It's kind of boring but I realized that this is a necessary step for gaining knowledge on my new job. There's so much to learn. The challange is how to narrow what should I learn and focused on what's really important. It's not an easy task because everything seems important.
more ...
Label: Telkomsel Probation
12/2/08
My Second Day
Yep, this is my second day in my new workplace. Overall everything is good....
more ...
Label: Telkomsel Probation
11/25/08
Pengangguran lagi...
Tepat hari ini, 25 November, gw kembali menjadi pengangguran.
Gw resign dari perusahaan lama, dan akan memulai karir di perusahaan baru per tanggal 1 Desember 2008. Wish me luck...
more ...
Label: Daily Life
10/30/08
Titik dalam email google (gmail)
Pasti diantara kita semua ada yang make gmail dengan nama email makai tanda titik (.) Misalnya khairil.irfan@gmail.com, dsb, dsb. Nah tanda titik yang kita anggap sebagai pemisah itu sebenarnya gak berarti apa-apa. Jadi tanda titik itu bisa aja diabaikan atau ditambahkan sesuka hati dan tetap saja email kita bakal sampe ke tempat tujuan.
Misal:
khairilthegreat@gmail.com
khairil.the.great@gmail.com
k.h.a.i.r.i.l.t.h.e.g.r.e.a.t@gmail.com
khairil..................thegreat@gmail.com
dsb, dsb, dsb,
Akan masuk ke satu alamat email yang sama : khairilthegreat@gmail.com.
Satu lagi, kita juga bisa nambahin tanda tambah di ujung alamat email kita dan emailnya akan masuk ke inbox yang sama...
Misal:
khairilthegreat+elektroui@gmail.com
khairilthegreat+permatabank@gmail.com
khairilthegreat+astra@gmail.com
Akan masuk ke satu alamat email yang sama : khairilthegreat@gmail.com.
Dengan fleksibilitas penggunaaan alamat ini ditambah filter yang sesuai, email gmail bisa kita atur untuk langsung menyusun email yang masuk sesuai selera..
Amazing right...
more ...
Label: Tips and Trick
10/29/08
Management Trainee Part 1
Sebentar lagi Career Daya UI. Bagi yang baru lulus tentu Career Days kesempatan baik untuk mencari kerja sesuai idamannya masing-masing. Masalah-nya bakal sangat sulit untuk seorang freshgraduate menentukan dimana sebaiknya bekerja. Banyak yang masih belum punya gambaran tentang kehidupan setelah kampus. Di tulisan ini gw akan mencoba memberi sedikit gambaran dan insight tentang posisi Management Trainee (lebih khusus-nya ke Financial Institution MT) susuai pengalaman gw. Mudah-mudahan tulisan ini bisa memberi sedikit pencerahan bagi freshgraduate-freshgraduate yang masih blom tau apa itu MT.
Management Trainee, terutama di bank, punya banyak variasi. Ada yang menyebut dengan istilah ODP, MDP, MAP, GMAP, PPS, PPE dsb, dsb. Secara prinsip, semua istilah itu sama. Yang membedakan cuma perusahaan yang ngadain dan teknis pelaksanaan program. Di perusahaan non-bank mayoritas namanya sama, Management Trainee. Bagi beberapa orang yang masih sangat awam dengan istilah ini, MT dianggap sebagai karyawan HR yang kerjaannya memberikan pelatihan ke manajemen :) Adanya kata-kata trainee bikin orang nganggap MT berkaitan erat dengan HR. It's a common mistake. Bedakan kata trainer dengan trainee. Trainer artinya "orang yang melatih", sedangkan trainee artinya "orang yang dilatih".
Dari makna kalimat diatas, bisa dilihat bawa MT itu adalah karyawan-karyawan yang dilatih untuk menjadi kandidat-kandidat manajemen suatu perusahaan. Seringkali istilah ini kemudian di blow-up dengan menyatakan bahwa MT adalah "calon-calon pemimpin suatu perusahaan". Hal ini SEPENUHNYA tidak......salah (hehe :)). Orang-orang yang dipilih untuk mengikuti program-program sejenis MT ini memang disiapkan untuk menjadi middle management suat perusahaan. Namun jangan salah, walaupun program ini bertujuan untuk membentuk calon pemimpin belum tentu semua orang yang mengikuti program ini berhasil menjadi "orang" di perusahaan terkait. Itu semua balik lagi ke kerja keras dan nasib. Gw akan bagi tulisan ini menjadi Metode Training, Fasilitas, Career Path dan Kesimpulan.
1. Metode training
Di banyak perusahaan biasanya program MT dilaksanakan dengan cara training di kelas , OJT (On the job training), ujian, dan dilanjutkan dengan project. Ada juga perusahaan yang langsung memberikan project diawal. Gw akan bahas satu persatu.
a. In-Class Training
In class training dilaksanain sama seperti perkuliahan. Jadi kita bakal duduk di kelas, ngedengarin instruktur mengajarkan apa yang ingin dia ajarkan :). Biasanya step ini cukup membosankan karena beda dengan kuliah, kita belajarnya full days. 8 to 5, dan gak bisa cabut. Bayangin tuh. Kalau kuliah, pas bosan kan kita bisa aja keluar kelas, main-main ke kantin atau tidur aja di belakang kelas :), tapi kalau udah kerja gini mana bisa. Jadi satu-satunya option adalah dengan ngedengarin serius semua kalimat-kalimat yang meluncur dari mulut sang instruktur.
Karena kita dianggap orang-orang terpilih, materi yang ada juga biasanya sangat padat dan sangat banyak. Biasanya dalam seminggu udah ada 1 kardus bahan untuk di baca (atau untuk dijadikan bantal).
Hal yang paling asik di fase in-class training adalah makan yang terjamin. Hehehe. Di dua posisi MT yang pernah gw jalanin, biasanya akan ada dua coffee break di pagi dan sore hari ditambah dengan makan siang gratis. Maklumlah, sebagai anak kos, makan gratis merupakan suat kesempatan yang gak bisa dilewatkan. Ada juga temen gw yang MT Medco (GET) yang katanya kalau mau bisa bawa makanan pulang (hehehe). Pokoknya selama fase in-class training bisa dipastikan berat badan akan nambah.
b. On the Job training
Fase kedua ini berfungsi untuk melihat kenyataan di lapangan berdasarkan teori yang telah didapat di kelas. Jadi peserta training akan disebar ke unit-unit bisnis terkait untuk dapat melihat bagaimana cara kerja bisnis tersebut. Kalau lo pernah KP (Kerja Praktek) fase ini hampir sama seperti KP. Jadi biasanya lo duduk disamping orang yang sedang ngerjain kerjaan tersebut dan diberi kebebasan untuk bertanya apapun yang ingin lo tanya.
Keberhasilan kita difase ini sangat bergantung pada kemampuan komunikasi dan rasa ingin tau yang kita punya. kita bisa aja gak menanyakan apapun (cuman duduk manis) atau super cerewet sampai yang ditanyain ngerasa gak betah. It's your choice, tapi yang pasti keberhasilan fase ketiga ditentukan oleh fase ke dua ini.
Selain untuk melihat kenyataan di lapangan fase kedua ini juga bertujuan untuk menambah human network kita. Hal yang harus disadari bahwa di dunia kerja network sangat penting, jadi selain menambah ilmu, OJT juga dapat dijadikan sebagai ajang untuk menambah koneksi. Jadi banyak-banyak lah kenalan dengan orang-orang yang ditemui di OJT.
c. Ujian
Setelah in-class dan OJT tibalah saat yang ditunggu-tunggu. Ujian. Yah disini peserta MT akan diuji sesuai materi yang telah diberikan. Materinya pasti mencakup in-class training dan OJT. Ujian biasanya ada dua jenis, ujian tertulis dan ujian lisan (a.k.a presentasi). Kalo tertulis kayak ujian kuliah biasa. Untuk yang presentasi kita diharuskan mempresentasikan apa yang telah kita dapat selama program + ditanya-tanyain. Biasanya kita juga diminta untuk memberikan ide-ide improvement yang bisa memperbaiki kinerja bisnis.
d. Project
Project merupakan fase paling penting dalam proses MT. Di project kita akan diassign langsung ke divisi yang ada dan diminta untuk membuat suatu project yang bisa memberi nilai tambah bagi perusahaan. Fasi ini merupakan fase paling sulit, karena kita selain harus membuat project bersangkutan, kita juga telah dilibatkan dalam pekerjaan rutin.
...bersambung ke part 2 ...
more ...
10/19/08
Garmin Mapsource untuk rute perjalanan.
Semenjak gw mulai perprofesi sebagai MT, gw makin sering melintasi jalan-jalan ibu kota yang macat. Awalnya pas di ACC, dari yang semula di Depok gw melanglang buana ke TB Simatupang, Fatmawati, Kelapa Gading, Sunter dan Tangerang. Sekarang di Permata Bank perjalanan dilanjutkan ke Sudirman, Bintaro, Hayam Wuruk, Setiabudi, dan entah mana lagi. Maklum-lah MT kan profesi belajar, jadi gw diharuskan untuk pergi kecabang-cabang untuk mempelajari apa yang ada di cabang. Kebetulan pula ACC dan Permata punya cabang di seantero Jabotabek, jadilah gw berkelana dari satu tempat ke tempat lain.
Di PermataBank sekarang paling sering gw ada di Bintaro dan Sudirman. That’s why kost-an gw juga ada dua. Di Bintaro, dan Depok. Gak tahan kalau harus bolak balik
Depok-Bintaro, atau Bintaro-Sudirman. Kalo gw lagi di Sudirman gw naik kereta dari Depok ke Stasiun Sudirman. Kalo lagi di Bintaro gw pindah lah ngekos di Bintaro. Minggu ini lagi gak jelas nih, gak di Bintaro, gak di Sudirman. Hmmmmhh. Cukup menguras tenaga lah..
Anyway, gw mau berbagi pengalaman gimana mengenal jalan-jalan di Jobotabek dan cara sampai ke tujuan dengan selamat. Simpel banget caranya. Cukup pakai GPS. Hehehe. Dengan GPS rute-rute yang ada pasti bisa dicari dengan gampangnya. Tapi gimana kalau gak punya device GPS-nya, kayak gw. Masak harus nebak-nebak jalan? Pastinya tidak sodara-sodara. Walau tanpa GPS seharga Rp. xxxx rupiah, kita tetap bisa manfaatin software GPS untuk cari rute-rute terdekat ke satu lokasi. And, I’m about to tell you how…
Pertama download dulu dua aplikasi ini. Garmin Mapsource (http://www8.garmin.com/support/download_details.jsp?id=209) dan IndonesiaMap (http://www.navigasi.net/goptd.php). Dengan dua software mantap ini, you can plan your route easily and safely. Setelah di download, install si Mapsource. Lanjutkan dengan install Indonesia Map. Btw, untuk nginstall Mapsource pertama-tama pastikan lo punya Winrar di komputer, terus sebelum nginstall eksrak dulu MapSource_***.exe-nya. Trus buka folder hasil ekstraksi dan jalanin terlebih dahulu file “MAIN.msi”. Setelah ngejalanin file ini baru jalanin Mapsource_***.exe-nya dan IndonesiaMap. Setelah terinstall, jalanin Mapsource. Now you have the second best tool to plan your route.
Sebagai contoh, gw perlihatkan gimana cara nyari jalan dari Alam Sutera ke Depok. Perjalanan OJT pertama gw di ACC yang pulang-perginya menghabiskan waktu 5 jam. Hmmmmppphhh.
Sebelumnya biar gampang kita atur dulu option-option yang relevan.
1.Klik Edit ->Preferences -> Unit. Ganti option yang ada sesuai kebutuhan.
2. Klik Edit -> Preferences -> Routing. Atur seusia kebutuhan. Karena gw naik motor, maka gw bikin seperti dibawah
3. Untuk mensimulasikan macetnya kota Jakarta di pagi dan sore hari, gw atur driving speednya jadi 20 km/jam.
4. Klik Find -> Find Places. Di Tab feature, set Place Category = All Point of Interest. Set Name = Makro Alam Sutera. Klik Find, dan klik dua kali hasil yang muncul. Akan muncul daerah tersebut di layar. Pilih waypoint tool dan klik daerah Makro Alam Sutera. Akan muncul kotak dialog penamaan. Buat namanya sesuai kebutuhan.


5. Ulangi langkah 4 untuk buat waypoint di Margo City Square. Klik Find -> Find Places. Di Tab feature, set Place Category = All Point of Interest. Set Name = Margo City Square. Klik Find, dan klik dua kali hasil yang muncul. Akan muncul daerah tersebut di layar. Pilih waypoint tool dan klik Margo City Square.
6. Di bagian sebelah kiri, pilih tab Waypoints(2). Select Makro Alam Sutera dan Margo City Square. Klik kanan. Pilih Create Routes, Using Selected Waypoints. Terus di Window yang muncul pilih recalculate.

7. Jadi deh. Sekarang lo punya rute efektif dari Margo City Square ke Makro Alam Sutera. Untuk detail yang lebih spesifik bisa lihat di directions. 
8. Untuk melihat rute keseluruhan di satu layar, klik tab routes dan klik kanan route yang ada -> show selected route on map.

Rute yang harus diambil, yang warna kuning. Untuk memperjelas rutenya zoom ini atau zoom out aja. Lo juga bisa ngeset detail peta dari lowes ke highest. Deteail highest-nya bener-bener mantep bro. 
Finished. Hope this help planning your route.
more ...
Label: Tips and Trick
10/11/08
6/15/08
6/7/08
What will I become ...
Recently one of my friend ask about OSPF ...
He ask about how to configure OSPF on a Cisco Router. I tried to recall what I know about OSPF. Guess what, I don't remember much. What I can still recall is the acronym (Open Shortest Path First) and a little about the concept. Well, I forget most of the configuration.
I guess that's what happens when you dont refresh your memory about a certain subject. Over the previous 5 months, I gained many new knowledge, but none of it related to my major. I think I now know more about retained earnings than how to configure an OSPF network. Hahahaha.
I enjoyed studying economics as much as I enjoyed engineering. Both is a great subject and very interesting. For now, I think I will concentrate in GMAP program and learn everything I need to be a successful banker. In the future I still not very sure on my career path. Will I be an engineer or economist ? Time will tell. Eventually ...
more ...
