Selamat hari raya ied Fitri.
Minal Aidzin Wal Faidzin.
Mohon maaf lahir dan batin.

Hari ini hari yang melelahkan, setelah seharian muter2 dan merubah router u/ memanage beberapa link yang sebelumnya memakai metode loadbalace memakai OS mikrotik terpaksa harus migrasi ke metode round robin dengan OS Freebsd.
Masih bingung apa itu load balance, round robin, robin hood.. dll :P. Berikut sedikit kutipan yg saya ambil dari blognya Pak Jay
Dua koneksi
Permasalahan umumnya muncul di sini, saat sebuah router mempunyai dua koneksi ke internet (sama atau berbeda ISP-nya). Default gateway di router tetap hanya bisa satu, ditambah pun yang bekerja tetap hanya satu. Jadi misal router NAT anda terhubung ke ISP A melalui interface A dan gateway A dan ke ISP B melalui interface B dan gateway B, dan default gateway ke ISP A, maka trafik downlink hanya akan datang dari ISP A saja. Begitu juga sebaliknya jika dipasang default gateway ke ISP B.Bagaimana menyelesaikan permasalahan tersebut?
Konsep utamanya adalah source-address routing. Source-address routing ibaratnya anda dicegat di persimpangan oleh polisi dan polisi menanyakan “anda dari mana?” dan anda akan ditunjukkan ke jalur yang tepat.Pada router NAT (atau router pada umumnya), source-address secara default tidak dibaca, tidak dipertimbangkan. Jadi pada kasus di atas karena default gateway ke ISP A maka NAT akan meneruskan paket sebagai paket yang pergi dari IP address interface A (yang otomatis akan mendapat downlink dari ISP A ke interface A dan diteruskan ke jaringan dalam).
Dalam jaringan yang lebih besar (bukan NAT), source-address yang melewati network lain disebut sebagai transit (di-handle dengan protokol BGP oleh ISP). Contoh praktis misalnya anda membeli bandwidth yang turun dari satelit melalui DVB, namun koneksi uplink menggunakan jalur terestrial (dial-up, leased-line atau fixed-wireless). Dalam kasus ini paket inisiasi koneksi harus menjadi source-address network downlink DVB, agar bandwidth downlink dari internet mengarah DVB receiver, bukan ke jalur terestrial.
Di lingkungan Linux, pengaturan source-address bisa dilakukan oleh iproute2. Iproute2 akan bekerja sebelum diteruskan ke table routing. Misal kita mengatur dua segmen LAN internal agar satu segmen menjadi source-address A dan satu segmen lainnya menjadi source-address B, agar kedua koneksi ke ISP terutilisasi bersamaan.
Penerapan utilisasi dua koneksi tersebut bisa mengambil tiga konsep, yaitu round-robin, loadbalance atau failover.
1. Round-robin
Misalkan anda mempunyai tiga koneksi internet di satu router NAT, koneksi pertama di sebut Batman, koneksi kedua disebut Baskin dan koneksi ketiga disebut Williams, maka konsep round-robin adalah sang Robin akan selalu berpindah-pindah secara berurutan mengambil source-address (bukan random). Misal ada satu TCP session dari komputer di jaringan internal, maka koneksi TCP tersebut tetap di source-address pertama hingga sesi TCP selesai (menjadi Batman & Robin). Saat TCP session Batman & Robin tersebut belum selesai, ada ada request koneksi baru dari jaringan, maka sang Robin akan mengambil source-address koneksi berikutnya, menjadi Baskin & Robin. Dan seterusnya sang Robin akan me-round-round setiap koneksi tanpa memperhatikan penuh atau tidaknya salah satu koneksi.Pasti anda sedang pusing membaca kalimat di atas, atau sedang tertawa terbahak-bahak.
2. Loadbalance
Konsep loadbalance mirip dengan konsep round-robin di atas, hanya saja sang Robin dipaksa melihat utilisasi ketiga koneksi tersebut di atas. Misalkan koneksi Batman & Robin serta Baskin & Robin sudah penuh, maka koneksi yang dipilih yang lebih kosong, dan koneksi yang diambil menjadi Robin Williams. Request koneksi berikutnya kembali sang Robin harus melihat dulu utilisasi koneksi yang ada, apakah ia harus menjadi Batman & Robin, Baskin & Robin atau Robin Williams, agar semua utilisasi koneksi seimbang, balance.3. Failover
Konsep fail-over bisa disebut sebagai backup otomatis. Misalkan kapasitas link terbesar adalah link Batman, dan link Baskin lebih kecil. Kedua koneksi tersebut terpasang online, namun koneksi tetap di satu link Batman & Robin, sehingga pada saat link Batman jatuh koneksi akan berpindah otomatis ke link Baskin, menjadi Baskin & Robin hingga link Batman up kembali.
Berikut beberapa istilah yang sering digunakan di linux, beberapa istilah berikut juga sering digunakan di unix based OS.
Kernel The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that occurs in the system.
kernel can be contrasted with a shell (such as bash, csh or ksh in Unix-like operating systems), which is the outermost part of an operating system and a program that interacts with user commands. The kernel itself does not interact directly with the user, but rather interacts with the shell and other programs as well as with the hardware devices on the system, including the processor (also called the central processing unit or CPU), memory and disk drives
file system?
a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and retrieval. The DOS, Windows, OS/2, Macintosh, and UNIX-based operating systems all have file systems in which files are placed somewhere in a hierarchical (tree) structure. A file is placed in a directory (folder in Windows) or subdirectory at the desired place in the tree structure.
File systems specify conventions for naming files. These conventions include the maximum number of characters in a name, which characters can be used, and, in some systems, how long the file name suffix can be. A file system also includes a format for specifying the path to a file through the structure of directories.
what is mutiuser?
computer systems that support two or more simultaneous users. All mainframes and minicomputers are multi-user systems, but most personal computers and workstations are not. Another term for multi-user is time sharing.
what is GUI?
A graphical user interface (GUI) is a human-computer interface (i.e., a way for humans to interact with computers) that uses windows, icons and menus and which can be manipulated by a mouse (and often to a limited extent by a keyboard as well).
GUIs stand in sharp contrast to command line interfaces (CLIs), which use only text and are accessed solely by a keyboard. The most familiar example of a CLI to many people is MS-DOS. Another example is Linux when it is used in console mode (i.e., the entire screen shows text only).
Linux filesystem types?
minix, ext, ext2, ext3, xia, msdos, umsdos, vfat, proc, nfs, iso9660, hpfs, sysv, smb, ncpfs
what is fdisk?
The program Microsoft operating systems MS-DOS and non-NT versions of Windows use to create partitions on hard drives. Technically, the program is called fdisk.exe. It uses a text-based interface. Windows 95b first added support for FAT-32 partitions into fdisk. Before that it only supported partitions up to 2 GB using FAT-16. This is also a slang term for wiping a drive out completely, as in "I'm going to F-Disk this drive if Windows crashes one more time!" There are several non-Microsoft equivalents to fdisk, but all serve similar purposes--to allow partitioning of hard disk drives.
what is shell in linux?
A shell is a program that provides the traditional, text-only user interface for Unix-like operating systems. Its primary function is to read commands that are typed into a console (i.e., an all-text display mode) or terminal window (an all-text window) in a GUI (graphical user interface) and then execute (i.e., run) them.
The term shell derives its name from the fact that it is an outer layer of an operating system. A shell is an interface between the user and the internal parts of the operating system (at the very core of which is the kernel).
what is lilo?
Lilo means last in last out . LILO is a versatile boot loader for Linux. It does not depend on a specific file system, can boot Linux kernel images from floppy disks and hard disks, and can even boot other operating systems. One of up to sixteen differernt images can be selected at boot time. Various parameters, such as the root device, can be set indepenantly for each kernel. LILO can even be used as the master boot record.
What is Grub?
Grand Unified Bootloader (GRUB)” .A small software utility that loads and manages multiple operating systems (and their variants).
Where Is the Latest Kernel Version on the Internet?
The easiest way to update your kernel is to get the update directly from the distribution which you are running.
If you need or want to configure and compile your own kernel, the web page at http://www.kernel.org/ lists the current versions of the development and production kernels.
What is FSCK?
fsck - check and repair a Linux file system.
fsck is used to check and optionally repair one or more Linux file systems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier (e.g.UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems.
If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially. This is equivalent to the -As options.
what is partition?
A partition is a section of a hard disk. When you format a hard disk, you can usually choose the number of partitions you want. The computer will recognize each partition as a separate disk, and each will show up under "My Computer" (Windows) or on the desktop (Macintosh).
What is a boot loader?
Most simply, a boot loader loads the operating system. When your machine loads its operating system, the BIOS reads the first 512 bytes of your bootable media (which is known as the master boot record, or MBR). You can store the boot record of only one operating system in a single MBR, so a problem becomes apparent when you require multiple operating systems. Hence the need for more flexible boot loaders.
The master boot record itself holds two things -- either some of or all of the boot loader program and the partition table (which holds information regarding how the rest of the media is split up into partitions). When the BIOS loads, it looks for data stored in the first sector of the hard drive, the MBR; using the data stored in the MBR, the BIOS activates the boot loader.
What is PAM?
(Pluggable Authentication Modules) A programming interface that enables third-party security methods to be used in Unix. For example, smart cards, Kerberos and RSA technologies can be integrated with various Unix functions such as rlogin, telnet and ftp.
What is default shell in linux?
Most of the Linux Distributions default shell is bash shell
sek males nerjemahno
Sejarah skripsiku dimulai dengan pertanyaan2 setengah penting ke para dosen yang kutemui. Pak skripsinya koq di perpus rata2 coding sih? emang yg networking atau yg sejenis gtu gak boleh tah?. La memangnya kamu maunya apa?. Aku mulai berorasi semangat 45 mengutarakan ide2ku. Tapi...... koq dosennya kayaknya ga respon, apa bukan bidangnya atau gimana ya. -sigh-
Walhasil aku memutar otak, mutar stang, belok kanan, rem depan, gas poll. Cling! aku baru ingat kalau beberapa waktu lalu udah install FTP server memakai PureFTPD dan databasenya kan pakai mysql.
Tring2.. ;;)
Tercetus ide u/ membuat sistem informasi yg mengelola seluruh data pelanggan FTP hosting mulai dari data account, data pembayaran, data pelanggan, paket FTP, reset password dll.. Pokok intinya manajemen pelanggan ftp hosting lah. Bayangin aja kayak sistem untuk mengelola account di rapidshare atau gudang upload gtu... cieh.. sok mboisnya diriku.
Akhirnya gerilya dimulai, melalui jalan berliku-liku tapi lewat tol hehe..
Judul skripsiku mungkin kurang mbois ya.. Sistem Informasi Administrasi Pelanggan FTP Hosting...dst2..
Alhamdulillah sudah diuji dan yudisium tanggal 16 Agustus kemarin sudah diketik oleh sayuti melik dan disahkan atas nama bangsa indonesia.. Soekarno Hatta..ralat2!! pemirsa.. diuji oleh dosen2 kampusku lah dan disahkan oleh kampus kalo aq LULUS.
Tapi.. ijasah masih belum ditangan.. harus bayar 750K u/ ambil ijasah, itu uang wisuda dan tetek bengeknya.. cedih..bokek..
Debian merupakan salah satu distro (distibution) dari Linux. Linux merupakan sebuah Free OS berbasis Unix yang ditemukan oleh Linus T.
Linux mempunyai 4 komponen utama :
1. Kernel
2. Managemen File
3. GUI
4. Multi user
Debian ditemukan th 1993 oleh Ian Murdock, mahasiswa Purdue University, yang menulis the Debian Manifesto yang disebut sebagai kreasi distro linux u/ dimantain scr open dengan semangat Linux dan GNU. Nama debian diambil dari nama Ian dan nama pacarnya Debra yang akhirnya dimekso2kan menjadi debian.
Debian terbaru adalah etch (saat penulis posting tulisan ini). Sebelum etch ada sarge,woody,potato dll. Penamaan tersebut merupakan code untuk versi debian agar mudah diingat, misalnya untuk sarge (debian 3.1), woody untuk debian 3.0 dll. Kalau di freebsd penamaanya ya udah langsung aja sebut freebsd 5.4, freebsd 7.0 dst tidak ada codename2.
Untuk hardware2 yang didukung oleh debian bisa dilihat di sini
Sekian dulu untuk postingan kali ini. Postingan selanjutnya insya Allah masih tentang debian juga.
Artikel di terjemahkan secara bebas oleh penulis dari : http://debianhelp.co.uk/
Sebenarnya udah agak lama aku nyari perintah di linux untuk mengetahui jenis ditro yang digunakan, karena beda dengan freebsd yg kalau di uname -a langsung deh kliatan freebsd versi brapa stable atau release dll. coba nih bandingkan
uname -a pada FreeBSD :
FreeBSD 6.2-RELEASE-p1 #0: Tue Feb 27 17:40:07 WIT 2007 root@gateway.net:/usr/src/sys/i386/compile/ROUTER i386
uname -a pada pada unknown linux box :
Linux cobanet 2.6.21.5-smp #2 SMP Tue Jun 19 14:58:11 CDT 2007 i686 Intel(R) Pentium(R) D CPU 2.66GHz GenuineIntel GNU/Linux
Nah kan.. bagi saya yang kurang familier dengan linux apalagi versi kernel2nya.. susah juga.
Setelah tanya sini situ, ternyata bisa dicoba dengan cara
# more /etc/issue
Tapi pada linux box yg saya test keluarnya gini :
root@cobanet:~# more /etc/issue
Welcome to \s \r (\l)
Saya masih penasaran, akhirnya googling dannnnn alhamdulillah ketemu scriptnya, ini nih scriptnya :
#!/bin/ksh
system=`uname -s| tr 'A-Z' 'a-z'`
cputype=`uname -m`
for rfile in \
SuSE-release \
redhat-release \
redhat_version \
gentoo-release \
fedora-release \
turbolinux-release \
mandrake-release \
mandrakelinux-release \
debian_version \
debian_release \
knoppix-version \
yellowdog-release \
slackware-version \
slackware-release \
conectiva-release \
mandriva-release \
immunix-release \
tinysofa-release \
trustix-release \
adamantix_version \
yoper-release \
arch-release \
libranet_version \
va-release \
; do
if [ -r /etc/$rfile ] ; then
distro=$(echo $rfile | \
tr 'A-Z' 'a-z' | \
sed -e 's/[_-]\(release\|version\)$//')
if [ "$distro" = "va" ] ; then distro=va-linux; fi
break
fi
done
case "$distro" in
suse)
if grep -q Enterprise /etc/SuSE-release ; then
release=SLES
version=$(egrep 'VERSION' /etc/SuSE-release | \
sed -e 's/ *VERSION *= *//')-pl$(egrep 'PATCHLEVEL' \
/etc/SuSE-release | sed -e 's/ *PATCHLEVEL *= *//')
else
release=SuSE
version=$(egrep 'VERSION' /etc/SuSE-release | \
sed -e 's/ *VERSION *= *//')
fi
;;
redhat)
# First part of red hat release is everything before 'release'
release=$(sed -e 's/ release.*$//' /etc/redhat-release | \
sed -e 's/[^A-Z]//g')
# Second part of red hat release is numbers after 'release'
version=$( sed -e 's/^.* release//' /etc/redhat-release | \
sed -e 's/[^0-9]//g' | \
sed -e 's/\([0-9]\)\([0-9]\)/\1.\2/g')
;;
esac
# CPU info from /proc/cpuinfo
set -A model_info \
$(grep 'model name' /proc/cpuinfo | \
uniq | \
tr 'A-Z' 'a-z' | \
perl -wn -e \
's/\s*model\s*name\s*:\s*//go; s/\((tm|r)\)//go; s/\s*(processor|cpu)//go; print;')
cpuvendor=${model_info[0]}
cpumodel=${model_info[1]}
cpuspeed=${model_info[2]}
# GLIBC info:
glibc=$(rpm -qv glibc|uniq)
printf "$system $cputype $cpumodel $distro $release-$version $glibc $cpuvendor $cpuspeed\n"
Tau kan iklan odol *ups sebut merk*, maksud saya iklan pasta gigi yang ada gelembung2 di pasar dan akhirnya cowok n ceweknya ketemu. Nah, saya suka lagunya :P.
Mirip2 sama lagunya coldplay yang ini, mantap!. Coldplay, grup musik yang saya suka setelah scorpions ^_^. Sementara ini scorpion numero uno, dan coldplay number one. loh?? :P
Lights go out and I can't be saved
Tides that I tried to swim against
You've put me down upon my knees
Oh I beg, I beg and plead (singing)
Come out of things unsaid, shoot an apple off my head (and a)
Trouble that can't be named, tigers waiting to be tamed (singing)
You are, you are
Confusion never stops, closing walls and ticking clocks (gonna)
Come back and take you home, I could not stop, that you now know (singing)
Come out upon my seas, curse missed opportunities (am I)
A part of the cure, or am I part of the disease (singing)
You are [x6]
And nothing else compares
Oh no nothing else compares
And nothing else compares
You are [continues in background]
Home, home, where I wanted to go [x4]
La kon seneng tah dike'i wong terus-terusan?
Gak pingin tah ngeke'i wong?
Ceritanya berawal dari instalasi server yang menggunakan 2HD. Kedua HD merk sigit tsb terpasang di IDE 1, sbg juragan dan pembantu alias master n slave.
Di FreeBSD dikenal sbg ad0 dan ad1. ad0 saya install OS FreeBSD sedangkan ad0 tidak ada OS nya, hanya partisi data saja.
Jreng.. jreng.. takdir berkata lain, baru semalam dipasang ternyata ngadat hihi..
setelah cek sana sini sono ternyata HD satunya gak berezzz. Untung aja hd yg tak partisi sbg data, bukan OS e.. lek OS e lak ndomblong aq nginstall maneh... :P
Akhirnya pasang HD baru, tp HD yg kedua gak tak jadiin pembantu. Smua tak jadiin master biar adil. Nah.. berhubung HD pengganti ini partisinya masih NTFS, maka perlu qta partisi ulang, dilabel trus di mount biar terbaca di OS ku.
Begini loh caranya yg cepet :
- ketik sysinstall u/ FreeBSD versi 6 ke atas, untuk v.5 kebawah ketik /stand/sysinstall.
- pilih configure - partition
- delete semua partisi (d) - ketik a - ketik w, kalau ada komentar pilih yes aja wes - ketik q untuk finish
- untuk pilihan instalasi MBR, pilih "none".
- pilih label
- ketik c - jika ingin dijadikan satu partisi jangan edit angka yg ada - kemudian pilih "file system" ketikkan nama mount pointnya, misal : /data
ketik w - pilih "yes"
- ketik q untuk finish
Nah, belum selesai kare di /etc/fstab belum ada mounting pointnya :P
tinggal tambahkan aja :
# Device Mountpoint FStype Options Dump Pass#
/dev/ad2s1d /data ufs rw 2 2
Selesai.
Untuk mode text ada juga caranya :
# fdisk -BI /dev/ad2
# bsdlabel -w -B ad2s1d
# bsdlabel ad2s1d
# newfs /dev/ad2s1d
# bsdlabel -e ad2s1d
# mount /dev/ad2s1d /data
Jgn lupa tambahkan mountingnya di /etc/fstab
^___^
Siapa bilang samba itu khas brazil? buktinya di sini ada samba terasi.. samba goreng ati :P.
Bismillah, kita mulai buat sambal..
# cd /usr/ports/net/samba
# make install clean
# cd /usr/ports/security/samba-vscan (saya pakai clamd)
# make install clean
File konfigurasi samba ada di /usr/local/etc/smb.conf
Mari kita edit file konfigurasinya :
log file = /var/log/samba/log.%m
log file = /var/log/Samba-%m.log
[global]
workgroup = grupkerjo
security = share
server string = Data Server
#local master = yes
#os level = 65
#domain master = yes
#preferred master = yes
#null passwords = no
#hide unreadable = yes
hide dot files = yes
[data]
comment = Iki loh mek komentar, gak ngaruh opo².. sumpah!
browseable = yes
writable = yes
path = /data/home/
security = USER
encrypt passwords = yes
smb passwd file = /usr/local/etc/samba/smbpasswd
username map = /etc/passwd
[umum]
comment = %h Shared Public Directory
path = /data/umum/
force directory mode = 0777
force create mode = 0777
force group = nobody
force user = nobody
public = yes
writeable = yes
read only = no
vfs object = vscan-clamav
vscan-kavp: config-file = /usr/local/etc/samba-vscan/vscan-clamav.conf
Ket :
Jika kita mengakses server samba, anggap saja ipnya 10.11.12.13, maka akan ada 2 folder yaitu data dan umum. Untuk umum bisa diakses tanpa ada login, sedangkan u folder data akan muncul login.
Cara create login adalah dgn adduser di OS, misalkan usernamenya runia.
Lanjutkan dengan create login tsb u/ samba.
# smbpasswd -a runia
Nahh.. selanjutnya adalah pengalaman yg simple tapi sebel :))
Ceritanya, dari windows itu kalau mau ngakses ke folder samba yg kita kasih password kan usernamenya selalu default dgn login sewaktu kita masuk windows..(biasanya sih Guest).
Untuk meyiasatinya, akses folder kita - klik kanan - map work drive. NAH! klik pada pilihan "login as different user". Masukkan login kita, misal runia disertai passwordnya...
Selamat mencoba.. dan selamat tidur.. aku ngantukk
Install BerkeleyDB
cd /downloads
fetch http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz
tar xzvf db-4.3.28.NC.tar.gz
cd db-4.3.28.NC
cd build_unix
../dist/configure --prefix=/usr/local/BerkeleyDB
make
make install
cd ..
cd ..
cd /usr/local/BerkeleyDB/lib
cp * /usr/local/lib
cd /usr/local/BerkeleyDB/include
cp * /usr/local/include
fetch http://www.squidguard.org/squidGuard-1.2.0.tar.gz
tar -xzvf squidGuard-1.2.0.tar.gz
cd squidGuard-1.2.0
./configure
make
make test
make install
buat directory
/usr/local/squidGuard/log
cd /usr/local/squidGuar/
fetch http://squidguard.mesd.k12.or.us/blacklists.tgz
tar -xzvf blacklist.tgz
mv blacklist db
chown -R squid:squid db
buat file
ee /usr/local/squidGuard/squidguard.conf
dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/log
dest ads {
domainlist ads/domains
urllist ads/urls
}
dest drugs {
domainlist drugs/domains
urllist drugs/urls
}
dest gambling {
domainlist gambling/domains
urllist gambling/urls
}
dest hacking {
domainlist hacking/domains
urllist hacking/urls
}
dest porn {
domainlist porn/domains
urllist porn/urls
}
dest redirector {
domainlist redirector/domains
urllist redirector/urls
}
dest spyware {
domainlist spyware/domains
urllist spyware/urls
}
dest violence {
domainlist violance/domains
urllist violance/urls
}
dest white {
domainlist white/domains
urllist white/urls
}
acl {
default {
pass white !ads !drugs !gambling !hacking !porn !redirector !spyware !violence all
redirect http://localhost/block.html
}
}
Tambahkan baris berikut pada squid.conf
redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidguard.conf
Jalankan squidguard
/usr/local/bin/squidGuard -c /usr/local/squidGuard/squidguard.conf
dan restart squid
/squid/sbin/squid -k reconfigure
Ia berkata : "Ya Tuhanku, sesungguhnya tulangku telah lemah dan kepalaku telah ditumbuhi uban, dan aku belum pernah kecewa dalam berdo'a kepada Engkau, ya Tuhanku. (QS : 19:4)Kekuatan sebuah do'a dan keyakinan akan pertolongan dari Tuhan yang Maha memiliki dan Maha berkehendak adalah bukti tawakal seorang hamba. Seperti kutipan do'a nabi Zakariya di atas. Semoga dapat kita ambil hikmahnya dan yakinlah bahwa setiap masalah pasti ada jalan keluarnya. Kalo ngga ada yah bisa pakai tangga darurat yang ada plangnya EXIT itu lohh.. :P..
Barusan iseng2 bantu teman bikin script pengcopyan file dgn kondisi tertentu. Berikut scriptnya :
# ee /etc/duplikat
cd /home/rahma/coba
lastfile=$(ls -rt | egrep -v '^d' | tail -20)
for file in $lastfile
do
echo $file
cp $file /home/rahma/coba2
done
Script diatas adalah script yang akan menjalankan duplikasi 20 file terbaru dari folder coba ke folder coba2.
Tinggal di pasang di crontab dan dijalankan sesuai dengan waktu yang diinginkan ^^.
Besok hari terakhir jadi orang kantoran...
Yup, saya resign, setelah disana lumayan lama.
Waktu bilang ke ortu, It's OK! asalkan kuliahku cepat selesai ^^.
Malah bapak sempat bilang, nanti kalau sudah dpt ijasah suruh memperdalam bhs inggris n cari beasiswa ke LN. Bapak yang aneh..:P harusnya kan disuruh cepat² nikah, koq malah suruh sekolah lagi. But gpp sich, kalau sama Allah dikasih kesempatan pasti kuwujudkan impianmu pak! I'll try my best for you two!
Bye.. bye my opis.. banyak suka.. banyak duka.. banyak pengalaman dan pelajaran disana...Bye bye nokia 2255, bye wireless.. bye meja pojok dekat jendela ^_^
Saatnya memulai yang baru dengan lebih baik. BISMILLAH....
Postingan ini repost, berhubung yang dulu belum selesai dan kebetulan ada teman yang lagi pusing² mau nyoba captive portal ini. Kita mulai aja ya,.. *baca bismillah*
SESI KONFIGURASI HARDWARE
# ee /usr/src/sys/i386/conf/kernelku
Edit file kernelku, untuk firewall terserah tapi untuk device tun wajib, fadhu ain!
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_FORWARD
options IPFILTER
options IPDIVERT (jika natnya nanti menggunakan NATD)
options DUMMYNET
options TCP_DROP_SYNFIN
device tun
simpan dan building kernel
# config kernelku
Kernel build directory is ../compile/kernelku
Don't forget to do a ``make depend''
# cd ../compile/kernelku
# make depend && make && make install && reboot
Ok, urusan kernel selesai, pastikan kita memiliki 2 NIC. Untuk NIC yang terhubung ke internet silahkan diconfig, sedangkan untuk yang terhubung ke AP(Wireless device) jangan diberi ip. Berikut contohnya :
# ifconfig
rl0: flags=8802
media: Ethernet autoselect (100baseTX
xl0: flags=8843
Untuk AP (Access Point) setting saja ssidnya, Modenya mode Access Point dan IPnya terserah (ip defaultnya ga masalah) yang penting client bisa konek ke AP kita. jangan aktifkan dhcpnya karena nanti chilli yang akan memberi ip ke client yang konek.
SESI MUMETISASI
Ok Urusan hardwarenya selesai, sekarang mulai proses instalasi software2 yang dibutuhkan :
download source file openssl openssl-0.9.8e dan ekstrak
./config
make && make test && make install
download source file apache httpd-2.2.3 dan ekstrak
./configure --prefix=/usr/local/apache --enable-ssl --with-ssl=/usr/local/ssl
make && make install
Untuk mengaktifkan ssl di httpd bisa di link ini http://www.dev411.com/wiki/Installing_Apache2_SSL
Untuk instalasi radius, ikuti petunjuk di postingan saya yang ini (mysql harus terinstall ya)
download source file chillispot-1.0 dan ekstrak
./configure
make && make install
# ee /usr/local/apache/conf/httpd.conf (setting directory cgi & ssl saya sbb:)
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
Include conf/extra/httpd-ssl.conf
# ee /usr/local/apache/conf/extra/httpd-ssl.conf
Listen 443
DocumentRoot "/data"
ServerName 192.168.182.1
ServerAdmin noc.spin.net.id
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
# cp /usr/local/share/chillispot/hotspotlogin.cgi /usr/local/www/cgi-bin/
# cp /usr/local/share/chillispot/chilli.conf /etc/chilli.conf
Saya anggap instalasi freeradius dan mysqlnya sudah terinstall dan berhasil.
Untuk chilli, konfigurasinya ada di /etc/chilli.conf, setting sbb :
net 192.168.182.0/24
dynip 192.168.182.0/24
statip 192.168.182.0/24
dns1 203.134.239.153
dns2 203.134.232.3
radiuslisten 203.134.232.20
radiusserver1 203.134.232.35 (ip dimana radius server terinstall)
radiusserver2 203.134.232.35 (ip dimana radius server terinstall)
radiusauthport 1812
radiusacctport 1813
# TAG: radiussecret
# Radius shared secret for both servers
# For all installations you should modify this tag.
radiussecret testing123
# password radius ada di /usr/local/etc/raddb/clients.conf
dhcpif rl0
# nama interface yang terhubung ke wireless device
# Universal access method (UAM) parameters
uamserver https://192.168.182.1/cgi-bin/hotspotlogin.cgi
uamhomepage http://192.168.182.1/welcome.html
uamsecret ht2eb8ej6s4et3rg1ulp
uamport 3990
uamallowed 192.168.182.1,203.134.232.20,203.134.232.35,203.134.232.3,203.134.239.153
# ee /usr/local/apache/cgi-bin/hotspotlogin.cgi
$uamsecret = "ht2eb8ej6s4et3rg1ulp";
$userpassword=1;
Uam secret pada chilli.conf dan hotspotlogin.cgi harus sama.
Untuk directory web saya terletak di /data dan saya create welcome.html disana dengan isi sbb :
Click Here For Login
Aktifkan ipnat di /etc/defaults/rc.conf kemudian tambahkan baris berikut di file konfigurasi ipnatnya.
# ee /etc/ipnat.rules
map rl0 192.168.182.0/24 -> 203.134.232.20/32
OK, jika sudah selesai semua, jalankan chillinya sbb :
# chilli --fg -c /etc/chilli.conf &
Hasil ifconfig sbb :
rl0: flags=8843
options=8
inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
inet6 fe80::20e:2eff:fecb:3cbb%rl0 prefixlen 64 scopeid 0x1
ether 00:0e:2e:cb:3c:bb
media: Ethernet autoselect (100baseTX
status: active
xl0: flags=8843
options=9
inet 203.134.232.20 netmask 0xffffffc0 broadcast 203.134.232.63
inet6 fe80::2b0:d0ff:fe4b:af9%xl0 prefixlen 64 scopeid 0x2
ether 00:b0:d0:4b:0a:f9
media: Ethernet autoselect (100baseTX
status: active
tun0: flags=8051
inet6 fe80::20e:2eff:fecb:3cbb%tun0 prefixlen 64 scopeid 0x4
inet 192.168.182.1 --> 192.168.182.1 netmask 0xffffff00
Opened by PID 42197
Selamat mencoba dan jangan menyerah ya.. saya juga butuh berhari-hari koq nguplek² ini dan alhamdulillah berhasil.. tapi akhirnya ngga dipakai... asem! :P
Berhubung ada suatu hal, maka saya harus migrasi semua mail² saya yang sekarang ini pakai Outlook Xpress ke Thunder Bird. Emailnya buwanyakkk bok.. ribuan deh.. maklum email dari jaman gak enak dulu sampai jaman tambah ga enak masih ada..
Setelah coba mencoba.. lagi.. kau mencoba... *koq jadi lagu dangdut?*
Ternyata cara paling mudah adalah dengan cukup mengcopy folder dimana database email disimpan (.dbx) oleh OE dan mengimportnya ke TB.
Letak folder di OE bisa dicek dengan cara klik tool - option - pada tab maintenance - nahh disitu ada store folder kan? ya disitu letaknya... Kalau TBnya di lain PC tinggal copy aja isi folder tsb dan paste ke PC tujuan. Selanjutnya buka TB klik menu tool - import - pilih mail - pilih OE dan arahkan ke folder dimana database email berada - klik Ok..
Selesai deh... kalau email kamu ribuan ya tinggal aja ngopi² dulu :P.
Innodb?
Saya juga barusan tahu koq, berikut ini kutipan mengenai innodb (diambil dari sini & tambahan untuk setting di mysql ver 5 saya yg terinstall di FreeBSD 5.4).
Tipe database di MySQL secara default adalah MyIsam, selain itu mysql juga mendukung untuk tipe database InnoDB dan BerkeleyDB. Database tipe InnoBD supports transactions, row-level locking, dan foreign keys. Membuat tabel tipe InnoDB sama saja dengan MyISAM, cuma ada sedikit perbedaan pada tipe ENGINE yang digunakan.
Contohnya:
CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
jika tidak menuliskan ENGINE=INNODB maka tipe tabel yang terbentuk adalah MyISAM.
ON DELETE CASCADE maksudnya apabila ada record di tabel parent yang dihapus maka pada tabel child record yang terkait dengan record parent akan ikut terhapus juga.Terdapat berbagai macam option-option lainnya seperti : ON DELETE RESTRICT, ON UPDATE CASCADE, dll yang bisa digunakan sesuai kebutuhan database.
Untuk mengaktifkan innodb, edit file /etc/my.conf dan pada sesi innodb sbb :
# Uncomment the following if you are using
InnoDB tablesinnodb_data_home_dir = /usr/local/mysql/var/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/var/
innodb_log_arch_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
OK, save dan restart mysqlnya.
Done.. done.. minum dulu ahh.. hauss..
Namanya manusia ga luput dari kesalahan, lalai dan teledor. Dan akibatnya macam², tak jarang kesalahan kecilpun bisa berakibat fatal. Bayangin aja misalnya dokter salah tulis dikit aja ngasih resep, atau diagnosa bisa berakibat kematian kan..
Ok, kita ngga akan bahas medis karna gw ga ngeri sekali sama. Gw cuman mau nulis kesalahan kecil gue yang berakibat fatal meski ga sampe menyebabkan kematian *sigh*
Sore kemarin server gw loadnya beraaattt banget... seperti seorang pemuda yang naik BMW tapi mangku gajah lampung! Segera saja otakku yang mungkin sama dgn otak manusia indonesia yang jarang digunakan karena takut aus mulai terasah.
Tiba2 saja saya sudah login di gateway server² dan mulai mengallow ip tertentu yang diijinkan untuk ngakses server dan mulai mendeny ip2 yang tidak dibutuhkan untuk mengurangi load server gw yang sedang mangku gajah duduk..
Crap!
Ada rule yang salah saat ngetikkan baris2 perintah firewall...
Jadinya gateway ga bisa saya akses dan server yang lain juga sama kecuali server yg diduduki gajah tadi.
Help.. tasukete kudasai!..
Gatewaynya jauh di ibukota negara banjir nan macet 924 km darisini.
Harus call teman dulu disana, setelah proses yang mendebarkan bin menyebalkan bisa juga terhubung dan dia harus menempuh lebih dari 30 menit untuk sampai dan cangkruk di consolenya.
Oh baru cobaan gini aja gw dah bingung setengah hidup, ya maklum wong gatewaynya u/ beberapa server maha penting.
Finally smua bisa diatasi *ya jelas wong emang rulenya simple tapi mematikan*
Server yang lambreta ternyata karena ada salah satu cust. yang ngabis2in resource servernya, so smtr saya suspend dulu.
Report juga udah kukirim, report yang apa adanya tanpa bumbu² sedikitpun. Rangkaian kejadian dari awal sampai akhir sampai main effect kutulis disertai perasaan nano-nano seorang kuli yang sedang berkecamuk di dada. yah mo gmn lagi emang salah saya jadi tinggal siap2 konsekuensinya aja..
Hikmah yang bisa diambil :
1. Terkadang dengan cobaan sedikit saja, manusia sudah merasa merana. Terkadang makian sampai keluar, seakan lupa kalau nikmat yang telah diterima begitu banyak sampai tidak bisa dihitung bahkan walau jari gajah lampung ikut serta juga ga bakal cukup untuk ngitung. Kalkulator bisa jadi akan buffer overflow kalau kita maksa ngitung.
2. Jika melakukan sesuatu yang harus cepat selesai, dan cukup merepotkan. Biasakan untuk menenangkan diri dan konsentrasi penuh dan jangan lupa bismillah.
3. Usahakan ruangan cukup kondusif, tidak ada teman yang mengganggu, suara atau hal² kurang penting lainnya.
dns1 named[1376]: client 125.162.42.67#64136: update 'swisscontact.or.id/IN' denied
I keep getting log messages like the following. Why?
Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
A:
Someone is trying to update your DNS data using the RFC2136 Dynamic Update protocol. Windows 2000 machines have a habit of sending dynamic update requests to DNS servers without being specifically configured to do so. If the update requests are coming from a Windows 2000 machine, see http://support.microsoft.com/support/kb/articles/q246/8/04.asp for information about how to turn them off.
Pake BIND? dan mengalami error sbb :
named[375]: master/domain.org:11: ignoring out-of-zone data ns2.mine.net.id
sama donk :P
Awalnya sih saya kira ada kesalahan di zone filenya. Tapi setelah diamati dalam tempo yang sesingkat²nya koq smua btul? ada apa ini.. ada apa.. :p
Saya coba query dari luar bisa u/ domain yg ada errornya tadi, dicek dari situs2 u/ cek dns juga ketemu tuh record²nya.
Akhirnya saya biarkan saja, toh sepertinya ngga ngaruh..
Sampai dengan pagi ini ada imel dari bos, nemuin log itu suruh nyari kenapa..
sebernaya gw juga bingung krn cari2 di google juga ga nemu, kalo nemu pun semua berkaitan dgn penulisan zone yang salah..
Ndilalah koq ada eror tambahan root. server bla bla.. duh sayang log e ilang :(
Gak pakai pikir lama, iseng² berhadiah tak coba replace named.rootnya
# dig @a.root-servers.net . ns > named.root
# rndc reload
Hurray.. thx god.. gw liat di log dah bersih sih.. n di query jg lancaarrr.. muach...
Ups.. jgn senang dulu.. ada cobaan lain.. muncul error ini nih di log, banyak lagi..
Feb 22 09:36:46 dns1 named[1376]: client IP#57305: RFC 1918 response from Internet for 3.0.168.192.in-addr.arpa
Untungya di FAQ ada :
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
mean?
A:
If the IN-ADDR.ARPA name covered refers to a internal address
space you are using then you have failed to follow RFC 1918 usage rules and are
leaking queries to the Internet. You should establish your own zones for these
addresses to prevent you querying the Internet's name servers for these
addresses. Please see http://as112.net/ for details of the problems you are causing
and the counter measures that have had to be deployed.
If you are not using
these private addresses then a client has queried for them. You can just ignore
the messages, get the offending client to stop sending you these messages as
they are most probably leaking them or setup your own zones empty zones to serve
answers to these queries.
zone "10.IN-ADDR.ARPA" {
type master;
file
"empty";
};
zone "16.172.IN-ADDR.ARPA" {
type master;
file
"empty";
};
...
zone "31.172.IN-ADDR.ARPA" {
type master;
file
"empty";
};
zone "168.192.IN-ADDR.ARPA" {
type master;
file
"empty";
};
empty:
@ 10800 IN SOA. . (
1 3600 1200 604800 10800 )
@ 10800 IN NS.