Akses Internet menggunakan Modem Ponsel

Internet dengan modem ponsel? Keraguan tersebut seringkali muncul dalam benak para pengguna aktif internet. Salah satu sebabnya adalah perhitungan tarif yang berbeda dengan koneksi internet biasa. Pada umumnya biaya yang harus dibayar dihitung berdasarkan lamanya penggunaan internet. Namun jika Anda memanfaatkan jalur GPRS maka biaya dihitung berdasarkan ukuran data yang dikirim maupun diterima. Apakah hal ini akan menguntungkan untuk pengguna? Apa kelebihan yang diperoleh dari akses internet dengan modem ponsel?

Pemanfaatan ponsel sebagai modem untuk akses internet hanya merupakan salah satu alternatif koneksi internet. Caranya adalah dengan menghubungkan ponsel ke komputer/laptop melalui kabel data, infrared, ataupun bluetooth. Selanjutnya ponsel yang terhubung ke komputer akan digunakan sebagai modem untuk berbagai aktivitas di internet. Namun bagi sebagian orang, pemanfaatan ponsel sebagai modem sering dianggap sebagai tindakan buang-buang uang semata. Biaya yang dikeluarkan masih lebih besar dibandingkan dengan koneksi internet biasa. Setiap kilobyte data yang dikirim dan diterima dari jalur GPRS melalui ponsel dikenai biaya yang bervariasi, berkisar Rp. 5 sampai dengan Rp. 30 per kilobyte, tergantung dari pilihan operator.
Tarif rata-rata yang ditetapkan oleh Indosat Seluler untuk akses internet melalui IM3 dan Matrix adalah sebesar Rp. 11 per kilobyte. Sedangkan Mentari tidak menyediakan akses internet melalui GPRS. Hal ini dikarenakan layanan GPRS yang ada pada Mentari sampai saat ini hanya digunakan untuk mendukung pengiriman MMS. Sedangkan Telkomsel memasang tarif akses internet melalui simPATI sebesar Rp. 30 per kilobyte dan KartuHALO sebesar Rp. 25 per kilobyte. Bagi pengguna XL, setiap data yang diakses melalui jalur GPRS dikenai tarif sebesar Rp. 25 per kilobyte. Untuk operator CDMA seperti Mobile-8 (Fren), StarOne (Indosat), dan Telkom Flexi menghargai layanannya sebesar Rp. 5 per kilobyte.
Apabila Anda memanfaatkan Fren, StarOne, atau TelkomFlexi (Rp. 5/kilobyte) untuk mengakses halaman depan situs detik.com yang berukuran 386 Kilobyte, maka pulsa yang akan dipotong berkisar 1930 rupiah. Sedangkan jika menggunakan modem biasa untuk membaca situs yang sama, dibutuhkan waktu rata-rata sekitar 3,5 menit. Dengan lama waktu tersebut, Anda akan terkena biaya berkisar 580 rupiah apabila dihitung dengan perhitungan biaya Telkomnet Instan (Rp. 9.900 / jam). Namun biaya Rp. 580 tersebut tentunya masih harus ditambah dengan lamanya waktu koneksi selama Anda online pada saat membaca halaman tersebut. Namun meskipun telah ditambah dengan waktu baca sekalipun, penggunaan internet dengan modem biasa secara keseluruhan dapat dikatakan lebih murah.
Dengan perhitungan tarif per kilobyte seperti di atas, biaya pemanfaatan internet dengan modem biasa nyaris tak tergantikan oleh akses internet dengan modem ponsel, kecuali jika Anda memilih paket unlimited seperti yang ditawarkan oleh Indosat Seluler. Anda hanya mengeluarkan Rp. 200.000 untuk pemakaian paket unlimited tersebut dalam setiap bulannya, alias senilai Rp. 278 per jam. Namun harga ini hanya dirasakan ringan untuk pengguna internet yang kebutuhan internetnya cukup tinggi dalam setiap bulannya. Seseorang yang mempunyai aktivitas internet cukup tinggi, tentunya tidak akan rugi jika melihat perhitungan harga tersebut. Asalkan kecepatan yang diperoleh tidak mengecewakan, biaya tersebut dapat dikatakan cukup murah. Namun yang perlu diperhatikan, kecepatan akses setiap lokasi seringkali tidak sama. Tergantung dari daya pancar sinyal GPRS ke ponsel pelanggan dan waktu sibuk jalur komunikasi yang dipakai.
Jika Anda bukanlah pengguna internet aktif, apa keuntungan komparatif dari pemanfaatan ponsel sebagai modem?
Keunggulan yang nyata terletak pada kemudahan pemakaian internet di daerah yang tidak terjangkau oleh kabel telepon, jaringan komputer, atau bahkan oleh jangkauan hotspot internet sekalipun. Jika pada suatu daerah terpencil seseorang dapat memperoleh sinyal GPRS, maka ia dapat mengakses internet melalui komputer/laptopnya dengan memanfaatkan ponsel. Selain itu, Anda juga dapat memanfaatkan internet sekalipun masih berada dalam perjalanan, tanpa harus dipusingkan adanya kabel telepon maupun lokasi penyedia jasa layanan internet (ISP). Bagi Anda yang memiliki mobilitas tinggi, cara mengakses internet seperti ini jelas akan mempermudah pekerjaan. Selain itu, apabila dibandingkan dengan layanan dial-up, koneksi internet melalui modem ponsel jauh lebih cepat. Karena kecepatan akses melalui jalur GPRS dapat mencapai 115 KBps, sedangkan pada pada dial-up maksimal hanya 56 KBps.

Instalasi
Sebelum memulai proses instalasi ponsel ke komputer, Anda harus memastikan layanan GPRS telah aktif terlebih dahulu. Khusus untuk IM3, layanan GPRS sudah langsung dapat digunakan ketika Anda membeli kartu perdana. Aktivasi GPRS yang paling mudah adalah dengan mengirimkan SMS dengan keyword tertentu ke salah satu nomor yang telah disediakan oleh operator ponsel. Beberapa operator yang menyediakan layanan SMS untuk aktivasi GPRS dapat Anda lihat pada tabel di bawah ini. Selain itu, Anda dapat menghubungi Customer Service masing-masing operator untuk aktivasi.

Tabel 1. Aktivasi GPRS

Operator

Ketik

Kirim Ke

Telkomsel

GPRS

6616

Indosat (Matrix)

PANGPRS

888

XL

GPRS

9667


Jika GPRS sudah aktif, carilah konektor yang sesuai dengan ponsel dan komputer/laptop Anda. Asalkan kedua ponsel memilikinya, Anda dapat menggunakan kabel data, infrared dan bluetooth sebagai penghubung antara ponsel dan komputer/laptop. Harga kabel data untuk setiap ponsel bervariasi, umumnya berkisar 250 ribu sampai dengan 500 ribu rupiah.
Jika pada layar komputer muncul pesan adanya modem yang terdeteksi ketika ponsel dihubungkan, maka siapkan driver modem yang disertakan dalam box ponsel. Pada beberapa versi Windows, seringkali dibutuhkan driver untuk melengkapi instalasi. Jika driver tidak ditemukan, Anda disarankan untuk men-download melalui situs vendor (perusahaan pembuat) yang bersangkutan di internet. Modem yang telah terinstalasi dapat dilihat melalui Start> Control Panel> Phone/Modem Options. Selanjutnya pilih modem yang telah dikenali dan tekan tombol Properties. Klik tab Properties > Advance. Pada kotak teks Extra Setting masukkan isian sebagai berikut: AT+CGDCONT=1, "IP", "APN". APN atau Access Point Name diisi dengan APN masing-masing operator misalkan internet (Telkomsel), satelindogprs.com (Matrix), www.indosat-m3.net (IM3), atau www.xlgrps.net (XL). Sebagai contoh jika Anda menggunakan Telkomsel: AT+CGDCONT=1, "IP", "internet". Sedangkan jika Anda menggunakan Matrix: AT+CGDCONT=1, "IP", "satelindogprs.com". Tekan tombol OK untuk menyimpan pengaturan tersebut.

Selanjutnya buatlah konfigurasi dial-up melalui Dial-Up Networking atau Network Connections. Masukkan nomor akses, user, dan password sesuai dengan operator ponsel yang digunakan. Anda dapat melihatnya pada tabel 2 di bawah ini.

Tabel 2. Konfigurasi Dial-Up Networking

Kartu

Nomor Akses

User

Password

Simpati

*99***1#

wap

wap123

Halo

*99***1#

wap

wap123

Matrix

*99***1#

[dikosongkan]

[dikosongkan]

IM3

*99***1#

gprs

im3

Fren

#777

m8

m8

TelkomFlexi

#777

telkomnet@flexi

telkom

Star One

#777

starone

indosat


Selanjutnya Anda dapat mulai mencoba melakukan koneksi dengan konfigurasi dial yang telah Anda atur. Selamat mencoba!

Mendaftar Domain .web.id (Gratis)

Dari beberapa permintaan mengenai panduan gimana mendapatkan domain web.id, saya tulis beberapa langkah praktis untuk mendaftar.

Daftar User di register.web.id

Buka halaman http://register.web.id. Jika anda belum memiliki account di register.web.id, lakukan pendafataran terlebih dahulu dengan klik [Register]. Isi formulir dengan benar. Username boleh tidak sama dengan domain yang akan kita daftarkan.

Mendaftarkan Domain Baru

Setelah proses registrasi selesai, login dengan user anda. Dan kerjakan langkah-langkah berikut.

  1. Periksa domain yang akan didaftarkan apakah masih tersedia atau tidak. Masuk ke halaman pemeriksaan domain.
  2. Masukkan domain yang akan diperiksa dan pilih induk domain yang diinginkan (dalam hal ini kita ingin mendaftar domain .web.id)
  3. Jika domain terlah digunakan oleh orang lain, ganti nama domain yang lain. Jika domain masih tersedia, klik tombol [Register] di bawah.
  4. Isi formulir pendaftaran domain dengan lengkap dan benar.
    Name diisi dengan nama anda
    Registrant type: Personal
    Primary server diisi dengan nameserver anda (contoh: ns1.myhosting.com). Jika belum memiliki nameserver bisa diisi sembarang dulu, bisa diubah di kemudian hari.
    Net Address diisi dengan IP address nameserver anda.
  5. Setelah semua formulir diisi dengan benar, klik tombol [Register]

Langkah selanjutnya adalah upload dokumen

Upload Dokumen

Untuk melakukan upload dokument, klik menu [Document Management], dan klik tombol [Create] untuk upload dokumen baru.

Pada halaman Document Submission:

  1. Pilih domain yang telah didaftarkan (belum disetujui)
  2. Pilih dokument type dengan KTP atau SIM (sesuai dengan dokument yang akan diupload)
  3. Document number diisi dengan nomor KTP atau SIM (contoh: KTP#11.1234.010171.0064)
  4. Browse file hasil pindaian (scan) KTP atau SIM
  5. Klik [Submit] untuk mengirim dokumen

Selesai

Pendaftaran domain web.id selesai. Silakan tunggu beberapa waktu untuk mendapatkan persetujuan dari DepKomInfo. Domain saya dalam waktu kurang dari 24 jam disetujui. Namun teman saya yang butuh waktu satu minggu baru disetujui, tergantung dari kesibukan petugas DepKomInfo.

Setelah domain disetujui, maksimal butuh waktu 1x24jam untuk bisa mengakses domain baru kita. Lamanya waktu tergantung waktu sinkronisasi domain baru dengan pengelola domain internasional.

Setelah domain baru selesai dibuat, tinggal setting nameserver di komputer server / shared hosting. Setting di komputer server bisa lihat dokumentasi dari masing-masing OS. Sedangkan untuk shared hosting, bisa lihat manualnya di masing-masing hosting provider.

Selamat melakukan registrasi di domain web.id



ATAU


Saat ini kepengurusan domain tingkat negara id (indonesia) dipegang oleh pemerintah pada Departemen Kominfo. Depkominfo belum memutuskan harga untuk semua domainnya dan saat ini tidak mengenakan biaya untuk pendaftara domain baru. Domain berakhiran .id gratis yang paling mudah didapatkan oleh perseorangan adalah domain .web.id. Cara cukup mudah dan tidak memerlukan biaya.

Untuk mendapatkan domain gratis tersebut anda diwajibkan membuat account baru pada situs registrasi cctld-id. Setelah anda membuat account anda dapat meregister domain .web.id yang anda inginkan. Kemudian siapkan dokumen pendukung seperti file image scan KTP/SIM/Paspor anda yang masih berlaku dan menguploadnya ke situs pengelola cctld-id. Setelah itu anda tinggal menunggu domain anda diaktifkan oleh pengelola.

Yang perlu diperhatikan adalah anda tidak boleh meregister domain yang mengandung unsur pornografi, kejahatan, nama kota, nama daerah, dll. Domain yang anda daftarkan tidak mengikutsertakan hosting, di mana anda harus mencari tempat menaruh file html anda yang dapat diakses orang lain sendiri. Anda bisa mendapatkan web hosting gratis yang dapat menerima domain .web.id anda di www.dd.am, www.ahbhost.com, www.arroways.com, dan masih banyak lagi lainnya.

Anda tidak hanya dapat meregister .web.id karena anda juga bisa mendaftar domain lain seperti .or.id .co.id .net.id dan lain-lain jika anda dapat memenuhi persyaratannya. Untuk mengisi Domain Name server saat pendaftaran anda dapat mananyakannya ke tempat webhosting anda. Biasanya DNS terdiri dari 2 address. Setiap web hosting memiliki DNS masing-masing yang berbeda. Untuk Name server address (NS address) anda dapat menanyakan juga di tempat hosting anda atau mengeceknya di www.dnsstuff.com secara gratis. Selamat mencoba.

Kunjungi situsnya : https://register.net.id


Tutorial Konfigurasi SNMPD di FreeBSD

Dibawah ini contoh file configurasi yg jalan untuk snmpd di FreeBSD.
Pada configurasi dibawah ini saya memantau penggunaan space dari HD server proxy di kantor beserta report resources dan penggunaan bandwidth oleh ethernetnya.

###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation "Labkom Center"

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact berny@labkom.unikom.ac.id

# sysservices: The proper value for the sysServices object.
# arguments: sysservices_number

sysservices 12

###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rwuser secret

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rouser secret

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity private 100.10.3.100

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity berny 100.10.3.100

###########################################################################
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
# arguments: host [community] [portnum]

trapsink 100.10.3.100

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink 100.10.3.100

# informsink: A SNMPv2c inform (acknowledged trap) receiver
# arguments: host [community] [portnum]

informsink 100.10.3.100 berny

# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity berny

# authtrapenable: Should we send traps when authentication failures occur
# arguments: 1 | 2 (1 = yes, 2 = no)

authtrapenable 1

###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
# The following check up on various aspects of a host.

# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#
# NAME: the name of the process to check for. It must match
# exactly (ie, http will not find httpd processes).
# MAX: the maximum number allowed to be running. Defaults to 0.
# MIN: the minimum number to be running. Defaults to 0.
#
# The results are reported in the prTable section of the UCD-SNMP-MIB tree
# Special Case: When the min and max numbers are both 0, it assumes
# you want a max of infinity and a min of 1.

proc squid

# disk: Check for disk space usage of a partition.
# The agent can check the amount of available disk space, and make
# sure it is above a set limit.
#
# disk PATH [MIN=100000]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Can be a raw byte value or a percentage followed by the %
# symbol. Default value = 100000.
#
# The results are reported in the dskTable section of the UCD-SNMP-MIB tree

disk /data 100000

# load: Check for unreasonable load average values.
# Watch the load average levels on the machine.
#
# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX: If the 1 minute load average is above this limit at query
# time, the errorFlag will be set.
# 5MAX: Similar, but for 5 min average.
# 15MAX: Similar, but for 15 min average.
#
# The results are reported in the laTable section of the UCD-SNMP-MIB tree

load 1 5 15

# file: Check on the size of a file.
# Display a files size statistics.
# If it grows to be too large, report an error about it.
#
# file /path/to/file [maxsize_in_bytes]
#
# if maxsize is not specified, assume only size reporting is needed.
#
# The results are reported in the fileTable section of the UCD-SNMP-MIB tree

file /usr/local/squid/var/log/access.log 1048576



Cara konfigurasi packet filter di Freebsd

Untuk konfigurasi Pfctl di FreeBSD secara sederhana sudah disediakan. File-file contoh tersebut diletakan di direktori example >> /usr/share/example/pf/. contoh-contoh file tersebut berisi contoh konfigurasi untuk masing-masing jenis kebutuhan standar minimal untuk pengaturan akses jaringan komputer dengan server freebsd menggunakan packet filter (pf).

ll /usr/share/examples/pf/
total 24
-r--r--r-- 1 root wheel 1363 Jan 12 14:40 ackpri
-r--r--r-- 1 root wheel 1201 Jan 12 14:40 faq-example1
-r--r--r-- 1 root wheel 3255 Jan 12 14:40 faq-example2
-r--r--r-- 1 root wheel 4691 Jan 12 14:40 faq-example3
-r--r--r-- 1 root wheel 985 Jan 12 14:40 queue1
-r--r--r-- 1 root wheel 1206 Jan 12 14:40 queue2
-r--r--r-- 1 root wheel 593 Jan 12 14:40 queue3
-r--r--r-- 1 root wheel 980 Jan 12 14:40 queue4
-r--r--r-- 1 root wheel 338 Jan 12 14:40 spamd

Dengan contoh konfigurasi minimal ini, maka koneksi ke jaringan sudah dapat berjalan.
tinggal terserah kita contoh konfigurasi yang mana akan kita gunakan.
Direktori example ( /usr/share/example ) sendiri menyediakan beberapa contoh konfigurasi lainnya selain packet filter (pf), seperti packet filter kita hanya perlu memodifikasi sedikit sesuai dengan konfigurasi sistem kita maka file-file contoh tersebut dapat kita gunakan di sistem operasi FreeBSD kita.

ll /usr/share/examples/
total 76
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 BSD_daemon
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 FreeBSD_version
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 IPv6
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 atm
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 bc
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 bootforth
drwxr-xr-x 3 root wheel 512 Apr 19 07:05 cvs
drwxr-xr-x 2 root wheel 512 Apr 21 05:16 cvsup
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 dialog
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 diskless
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 drivers
drwxr-xr-x 3 root wheel 1536 Apr 19 07:05 etc
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 find_interface
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 ibcs2
drwxr-xr-x 2 root wheel 1024 Apr 19 07:05 ipfilter
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 ipfw
drwxr-xr-x 5 root wheel 512 Apr 19 07:05 isdn
drwxr-xr-x 5 root wheel 512 Apr 19 07:05 kld
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 libdialog
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 libvgl
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 mdoc
drwxr-xr-x 3 root wheel 512 Apr 19 07:05 netgraph
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 nwclient
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 perfmon
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 pf
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 portal
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 ppi
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 ppp
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 pppd
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 printing
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 scsi_target
drwxr-xr-x 7 root wheel 512 Apr 19 07:05 ses
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 slattach
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 sliplogin
drwxr-xr-x 3 root wheel 512 Apr 19 07:05 smbfs
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 startslip
drwxr-xr-x 5 root wheel 512 Apr 19 07:05 sunrpc
drwxr-xr-x 2 root wheel 512 Apr 19 07:05 tcsh

Konfigurasi DHCP pada server freeBSD

DHCP merupakan protokol yang digunakan oleh komputer-komputer dalam sebuah jaringan untuk menentukan parameter seperti default gateway, subnet mask, dan IP address, DNS dari DHCP server. Fungsi umum DHCP server adalah untuk mempermudah pengalokasian IP address (selanjutnya disebut IP) dan juga pengaturan IP yang sangat dinamis untuk membantu memudahkan user agar tidak perlu mensetting IP ketika ada penambahan user baru atau setelah format ulang sebuah PC. Informasi lengkap mengenai DHCP silahkan baca di http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Introduction.

Setelah anda memahami fungsi dan cara kerja DHCP Server, marilah kita mencoba untuk menginstall sebuah DHCP Server.

Pertama yang harus dilakukan adalah login sebagai root pada server Anda, lalu masuk ke directory ports dhcp server

indofreebsd# cd /usr/ports/net/isc-dhcp3-server/
indofreebsd# make install

Setelah selesai installasi lakukan konfigurasi pada dhcp server tersebut.

Jika belum ada aplikasi dhcp-server, dapat melakukan langkah berikut :

Langkah-langkah berikut bisa dipakai untuk installasi dhcpd dari source-nya.

#wget http://ftp.isc.org/isc/dhcp/dhcp-3.0.6.tar.gz
#tar -zxvf dhcp-3.0.6.tar.gz
#cd dhcp-3.0.6
#./configure
#make
#make install

indofreebsd# pico /usr/local/etc/dhcpd.conf

contoh isi dhcpd.conf-nya

#—-mulai—–#

ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.100;
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.254;
option domain-name “http://mu2jotex.co.cc”;

default-lease-time 3600;
max-lease-time 86400;
}

#—selesai—-#

Simpan setelah selesai mengedit file konfigurasi di atas.

Lakukan konfigurasi pada rc.conf untuk menentukan jalannya DHCP server dan listen di interface mana DHCP server tersebut.

indofreebsd# ee /etc/rc.conf

tambahkan:

# —-mulai—-#

dhcpdenable=”YES”
dhcpdflags=”-q”
dhcpdconf=”/usr/local/etc/dhcpd.conf”
dhcpdwithumask=”022″
dhcpdwithgroup=”dhcpd”
dhcpd_ifaces=”rl1”

#—-selesai—#

kemudian simpan perubahan.

Jalankan DHCP server

indofreebsd# /usr/local/etc/rc.d/isc-dhcpd start

Starting dhcpd.

Sampai tahap ini selesai sudah proses menginstall dan menjalankan DHCP server. Untuk feature-feature lain silakan bereksprimen sendiri.

Sekarang kita coba DHCP server baru dengan mensetting obtain IP adress automatically pada PC windows atau menjalankan dhcpclient pada PC freebsd. Perhatikan aktivitas DHCP server lease tersebut dengan cara:

indofreebsd# tail -f /var/db/dhcpd.leases
lease 192.168.1.1 {
starts 2 2007/01/30 23:25:05;
ends 3 2007/01/31 00:25:05;
tstp 3 2007/01/31 00:25:05;
binding state active;
next binding state free;
hardware ethernet 00:01:6c:b0:d0:44;
uid “\001\000\001l\260\320D”;
client-hostname “underiez”;
}


Konfigurasi dan Optimasi Kernel pada FreeBSD (Lanjutan)

Yang perlu saya konfigurasi adalah membuat kernel agar support PF (PF miliknya OpenBSD nech :p;) trus support ALTQ CBQ trus untuk optimasi SQUID supaya bisa dukung diskd dan meng-unload konfigurasi-konfigurasi yang tidak saya gunakan pada kernel seperti dukungan terhadapa Slot ISA, RAID dan SCSI, USB, Wireless de eL eL -lah.

Untuk mengkonfigurasi kernel FreeBSD silahkan lakukan langkah-langkah berikut ini :

# cd /usr/src/sys/i386/conf
# cp GENERIC ROUTER
# ee ROUTER

Sebenarnya cara konfigurasi kernel ini dapat dilihat pada ebook-nya om 1smail pada tulisan saya terdahulu. Disini saya hanya menambahkan beberapa parameter untuk mengaktifkan fiture-fiture yang akan saya gunakan seperti yang saya sebutkan sebelumnya diatas :p .

kembali ke ee ROUTER pada bagian-bagian seperti

machine i386
#cpu I486_CPU
#cpu I586_CPU
cpu I686_CPU
ident Router

#options MSDOSFS

#options SCSI_DELAY=5000

# SCSI Controllers — commend semunya untuk menonaktifkan dukungan

#device ahb
#device ahc
#device ahd
#device amd
#device isp
#device ispfw
#device mpt
#device ncr
#device sym
#device trm

#device adv

#device adw
#device aha
#device aic
#device bt

#device ncv
#device nsp
#device stg

# SCSI peripherals
#device scbus
#device ch
#device da
#device sa
#device cd
#device pass
#device ses

# RAID controllers interfaced to the SCSI subsystem
#device amr
#device arcmsr
#device asr
#device ciss
#device dpt
#device hptmv
#device rr232x
#device iir
#device ips
#device mly
#device twa

# RAID controllers
#device aac
#device aacp
#device ida
#device mfi
#device mlx
#device pst
#device twe

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
#device cbb
#device pccard
#device cardbus

## cape nilisnya selanjutnya perkategori aza yach :)) ati-ati salah oke !

# ISA Ethernet NICs –> comment semua dibawahnya
# Wireless NIC cards –> comment semua dibawahnya
#USB Support –> comment semua dibawahnya
# FireWire support –> comment semua dibawahnya

Apa yang saya lakukan diatas adalah untuk menonaktifkan dukungan hardware terhadap perangkat-pernangkat yang tidak saya gunakan… ini berguna untuk meng-efisiensikan kernel terhadap sistem saya nantinya… dan yang paling penting adalah saya menambahkan ini pada bagian akhir konfigurasi file ROUTER untuk mengaktifkan beberapa parameter :

###—untuk support PF—-###
device pf
device pflog
device pfsync

###—untuk support altq cbq—###
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_PRIQ
options ALTQ_NOPCC

###—untuk optimasi squid untuk dukungan diskd—###
options SYSVMSG
options MSGMNB=32768
options MSGMNI=164
options MSGSEG=8196
options MSGSSZ=512
options MSGTQL=2048

###—optional—###
device carp
options HZ=1000

Setelah selesai save dan keluar dari editor dengan menekan [Esc] dan [Enter] 2x !

Selanjitnya tinggal meng-compile kernel yang baru saya dikonfigurasi :

# config ROUTER
# cd .. ../compile/ROUTER
# make cleandepend
# make depend
# make all
# make install

Selanjutnya tinggal di reboot dech… :D


Langkah - langkah Menginstall FreeBSD

Langkah Instalasi FreeBSD 4

–Panduan Singkat

Tulisan ini merupakan sebuah prosedur ringkas cara menginstalasi FreeBSD. Tetapi disini ditambahkan fungsi portupgrade -ai (mengganti semua port, dengan konfirmasi), yang memerlukan beberapa konfigurasi lokal dalam file pkgtools.conf. Tujuan uraian ini adalah memakai cvsup.sh && build-world-kernel.sh, dan terbangunnnya sistem yang dapat memberitahu anda apa yang harus dikerjakan kemudian agar instalasi lengkap dengan sedikit usaha. Bagi pemula, sebaiknya pada waktu praktek mengikuti langkah langkah berikut didampingi rekan yang telah terbiasa dengan instalasi FreeBSD. Penjelasan tentang perintah dalam FreeBSD silahkan lihat FreeBSD Handbook. Setelah anda sukses melakukan instalasi FreeBSD, gantilah kernel anda, dan instalasi beberapa port-nya.

Anda perlu perhatikan perintah instant-server dan instant-workstation meta-ports, yang menyatukan layanan yang diperlukan dan aplikasi dekstop. Terutama jika anda mengetik

cd /usr/ports/misc/instant-workstation && make

sistem anda akan menginstalasi berbagai macam software yang bermanfaat secara otomatis.

Dalam uraian ini tidak dijelaskan bagaimana mengubah script yang ada, anda mungkin harus memutuskan mengedit script dalam sistem anda nantinya dan disesuaikan dengan data teknis jaringan komputer anda. Pengeditan script bisa dilakukan dengan mengetik perintah vi namafilenya, setelah muncul filenya barulah anda edit atau isi dengan data teknis jaringan anda seperti nama host, IP address, netmask dll.

Catatan: Perintah $myself dan $hostname, yang dipakai dibawah ini tidak ditujukan sebagai variabel shell sebenarnya. Ketika anda melihat mereka, langsung masukan saja data yang sesuai dengan jaringan komputer anda. Postfix akan memakai variable yang ada didalam file main.cf, ingat – nama variabel dalam posfix (tidak ditulis italic) dan dapat diakses langsung, jadi Postfix dapat melakukan substitusi variabel secara sendiri.

Catatan: File file yang dipakai dalam prosedur ini ditujukan untuk pemakaian umum, dan meliputi berbagai saran. Namun ini belum tentu sesuai atau optimal bagi kebutuhan sistem anda. Akan tetapi cara berikut ini dapat merupakan awal yang baik bagi instalasi sistem anda. Disarankan untuk mendownload file resource bari uraian ini dari http://www.reppep.com/~pepper/freebsd/install/reppep.tgz, kemudian lihat dan sesuaikan dengan kebutuhan anda lalu copikan ke direktori /root/reppep untuk melanjutkan prosedur berikut nya.

Tip: Reboot after finishing each main heading, to make sure you haven’t broken anything too badly. If you break something and don’t notice quickly, fixing the problem gets much harder.

–>

Dasar Instalasi (sysinstall)

  1. Instalasi semua file distribusinya (”Semua source sistem, binari dan sistem X Window”).
  2. Instalasi koleksi port.
  3. Konfigurasi network.
  4. Tambahkan :
    • bash
    • cvsup
    • ispell
    • kde
    • mozilla-gtk
    • portupgrade
    • rsync
    • samba
    • screen
    • sudo
  5. Catatan: Jika anda ingin setiap user mempunyai group personal-nya (seperti yang ada pada Linux & Panther), buatlah group group baru pertama kali pada saat melakukan sysinstall. pastikan setiap langkah pembuatan account user, tiap user mempunyai group 0 (wheel) member– sebab dengan cara su akan mengalami kurang cocok.

Setup Dasar dan Account

  1. Serial console dibuat enable dengan mengetikan : echo "-hD" > /boot.config tekan enter.
  2. Bila anda tidak melakukan itu pada terminal serial didalam sysinstall, lakukan sekarang dengan cara mengetikan : echo 'ttyd0 "/usr/libexec/getty std.9600" dialup on secure' >> /etc/ttys lalu tekan enter.
  3. Ketikan: visudo # uncomment full access for %wheel lalu tekan enter.
  4. Ketikan: cd /root && ftp http://www.reppep.com/~pepper/freebsd/install/reppep.tgz && tar xzf reppep.tgz && ls -lt reppep kemudian anda tekan tombol enter, ambilah file file tambahan yang disarankan berikut patch-nya, dan bukalah pada untuk direktori /root/reppep — bila anda punya patch local, buka jugalah file file itu untuk patch lokal anda.
  5. Jika anda punya pacth lokal, bukalah file file itu dengan cara mengetikan. tar xzf local.tgz && ls -lt reppep tekan enter.
  6. Ketikan: patch /etc/ssh/sshd_config /root/reppep/sshd_config.diff tekan enter.
  7. Instalasilah file kernel anda dan tetapkan konfigurasinya dalam direktori /usr/src/sys/i386/conf.
  8. Ketikan: cd /etc && cp /root/reppep/make.conf . && cat /root/reppep/rc.conf* >> rc.conf && vi resolv.conf rc.conf make.conf && egrep -v ‘(^$|^#)’ rc.conf | sort | more # tuliskan semua konfigurasi jaringan komputer anda pada file rc.conf.local; pastikan tidak ada variabel yang anda tuliskan dua kali didalam file rc.conf.
  9. Ketikan: mkdir -p /home/ports/distfiles && cd /usr/ports && rmdir distfiles && ln -s /home/ports/distfiles # preserves ports across rebuilds
  10. Ketikan: mkdir -p /usr/sup && cp /root/reppep/cvsupfile /root/reppep/periodic.conf /root/reppep/ntp.conf /etc && cp /root/reppep/refuse /usr/sup && vi /etc/cvsupfile /etc/ntp.conf /usr/sup/refuse
  11. Ketikan: mkdir -p ~root/bin ~root/log
  12. Ketikan: cd /root/reppep && cp build-world-kernel.sh cvsup.sh /root/bin && chmod u+x /root/bin/*.sh && rehash
  13. Ketikan: patch /usr/local/etc/pkgtools.conf /root/reppep/pkgtools.conf.diff

Mengubah Source, Kernel dan World (dengan tipe terbaru, lakukan secara periodik)

Catatan: Rekomendasi dari FreeBSD ada di http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, walau agak susah tetapi secara teori cukup aman. Jika anda masih kurang jelas dg apa yang anda lakukan disini ataupun dengan mengikuti langkah dari situs tadi, bacalah prosedur yang tertulis didalam Handbook FreeBSD.

Peringatan: Langkah ini muda merusak sistem anda, atau mengunci anda sendiri, ketika melakukan perubahan kernel atau world. pastikan anda memiliki akses console (PS/2-style atau serial) sebelum melakukan perubahan.

  1. cvsup.sh # mengubah dasar FreeBSD yaitu source (kernel & world), dan pohon port; tidak akan berpengaruh terhadap port yang telah terinstall
  2. cd /usr/src && mergemaster -p # mergemaster akan membutuhkan banyak waktu, sehinga akan lebih b aik melakukannya sebelum sistem down.
  3. build-world-kernel.sh
  4. make installkernel
  5. shutdown -r now
  6. Pembuatan kernel baru.
  7. shutdown now # single-user
  8. cd /usr/src && make installworld
  9. mergemaster
  10. shutdown -r now
  11. Editlah tiap file konfigurasi tambahan ang ada dalam direktori /etc or /usr/local/etc.
  12. Ujilah sambungan komputer anda ke jaringan dan firewal-nya (mungkin memakai perintah ipfw list).

Catatan: Jika anda memakai bagian ini sebagai panduan dalam pengubahan sistem yang sedang beroperasi, dan bukan sistem yang baru anda buat, jangan lupa lakukan perintah portupgrade -ai pada saat kernel & world yang baru anda buat sudah selesai dikerjakan..

Mengkonfigurasi BIND

  1. cd /etc/namedb && sh make-localhost && mv named.root named.root.old && dig @m.root-servers.net. ns . > named.root && vi named.conf && grep named /etc/rc.conf # konfigurasikan domain promer dan domain slave & instalasilah file file zona; bisa dilihat dengan menyetel opsi named_enable="YES"
  2. Catatan: Konfigurasi BIND disini dioperasikan sebagai root tanpa partisi pengamanan khusus. Situs http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-dns.html memberikan instruksi untuk menjalankan BIND dalam sebuah kondisi chroot, dan BIND mungkin juga dioperasikan dalam kondisi jail. Kedua opsi tersebut cukup melindungi BIND dari serangan, dan bisa anda pertimbangkan, tetapi tidak akan dijelaskan dalam uraian ini.

Instalasi Port

  1. cd /usr/ports/lang/perl5.8 && make install && rehash && use.perl port && perl --version
  2. portupgrade -a && portversion |grep -v = # mencoba mengubah apa saja.
  3. portinstall analog cronolog curl docproj-nojadetex htmldoc lsof lynx-ssl minicom netatalk nmap nut procmail webmin apache2 squirrelmail p5-Mail-SpamAssassin drac imap-uw postfix && rehash # customized or perl-based
  4. cd /usr/local/etc && cp smb.conf.default smb.conf && vi smb.conf # disini pasword enkripsi diset enable, lalu melakukan disable terhadap local master, dan disable printer; Disini juga dituliskan pembatasan akses dari IP seperti yang dituliskan dalam firewall yang ada dalam file smb.conf, sehingga semua program terkontrol melalui file yang sama.
  5. echo "- -noddp -passwdminlen 6 -loginmaxfail 6 -uamlist uams_dhx.so" >> /usr/local/etc/afpd.conf
  6. cd /usr/local/etc/rc.d && patch netatalk.sh /root/reppep/netatalk.sh.diff # disable atalk, pap, & nbp
  7. mkdir -p /var/log/samba && cd /usr/local/etc/rc.d && cp netatalk.sh.sample netatalk.sh && cp samba.sh.sample samba.sh
  8. Konfigurasikan XFree86 (disini tidak akan dijelaskan lebih rinci) lihatlah situs http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html.
  9. Sekali XFree86 bekerja, pasti anda ingin menginstalasi KDE secara otomatis pada saat boot, coba lakukan perintah berikut : echo 'ttyv9 "/usr/local/bin/kdm" xterm on secure' >> /etc/ttys, or use KDE with startx: echo exec startkde > ~/.xinitrc

Mengkonfigurasi Mail

  1. cd /etc/mail && mv mailer.conf mailer.conf.sendmail && cp /root/reppep/mailer.conf .
  2. cd /usr/local/etc && cp /root/reppep/procmailrc . && vi procmailrc
  3. patch /etc/inetd.conf /root/reppep/inetd.conf.diff && patch /etc/pam.conf /root/reppep/pam.conf.diff # for imap-uw
  4. vi /usr/local/etc/mail/spamassassin/local.cf # customize SpamAssassin
  5. echo localhost > /usr/local/etc/dracd.host && /usr/local/etc/rc.d/dracd.sh start
  6. vi /etc/aliases && newaliases # forward for $myself & root
  7. Jika memakai Postfix Virtual Host, editlah dengan cara ketikan: vi /etc/mail/virtual && postmap /etc/mail/virtual
  8. cd /usr/local/etc/postfix && cat /root/reppep/main.cf.* >> main.cf && vi + /usr/local/etc/postfix/main.cf && postfix stop ; killall sendmail ; postfix check && postfix start && sleep 1 && tail /var/log/maillog
  9. cd /usr/ports/mail/imap-uw && make cert && chmod -x /usr/local/certs/imapd.pem # follow prompts
  10. Bila diinginkan port terpasang lakukan: portinstall -f mysql-server # -f to get around the hold in pkgtools.conf

Mengkonfigurasi Apache & SquirrelMail

  1. mkdir -p /var/log/httpd /home/httpd && mv /usr/local/www/data /home/httpd/htdocs && mv /usr/local/www/cgi-bin /home/httpd && cd /usr/local/etc/apache2 && patch httpd.conf /root/reppep/httpd.conf.diff && touch vhost.conf
  2. Either apply a local patch (patch httpd.conf /root/reppep/httpd.conf.diff.local), or vi httpd.conf (set ServerAdmin & ServerName dan lihatlah securitynya)
  3. apachectl configtest && apachectl graceful
  4. mkdir -p ssl.crt ssl.key && cp /usr/local/certs/imapd.pem ssl.key/server.key && cp /usr/local/certs/imapd.pem ssl.crt/server.crt && vi ssl.???/* vhost.conf && apachectl stop && apachectl configtest && apachectl startssl && apachectl fullstatus # remove cert from server.key & key from server.crt
  5. cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini
  6. cd /usr/local/www/squirrelmail && ./configure
  7. Test https://$hostname/mail/.
  8. Menguji Squirell Mail (dg cara mengunencryp IMAP ke localhost) & telnet $hostname imap akan gagal, jika diblok oleh firewall.
  9. Tambahkan plugin tambahan yang anda inginkan untuk SquirrelMail .

webmin

  1. cd /usr/local/lib/webmin/ && ./setup.sh
  2. Visit https://$hostname:10000/
  3. Konfogurasi Webmin: IP Access Control: aturlah “Only allow from listed addresses” to 127.0.0.1 & trusted IPs.
  4. User Webmin: Buanglah semua modul yang tidak diperlukan.
  5. Bila mysql-server terinstalasi didalam server anda, Konfigurasi webmin dilakukan dibawah: Servers.
  6. /usr/local/etc/rc.d/webmin.sh-dist stop # pakailah argumen start nanti, untuk mengoperasikan webmin bila diperlukan.

Cara Konfigurasi Firewall di FreeBSD Memakai IPFW

1. Konfigurasi Kernel

Ada beberapa opsi konfigurasi yang harus ditambahkan pada kernel agar ipfw dapat digunakan, Opsi yang akan di tambahkan pada file kernel antara lain :

options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #informasi firewallnya
options IPFILTER #dukungan untuk ipfilter
options IPFILTER_LOG #log ipfilter

#options IPFIREWALL_DEFAULT_TO_ACCEPT

Jika anda menginginkan default firewall menjadi terbuka, tambahkan saja opsi tersebut.

2. Kompilasi kernel

# cd /usr/src/sys/i386/conf; config CONFIG_KERNEL_
# cd ../../compile/CONFIG_KERNEL
# make depend; make

3. Instalasi Kernel

Jika proses diatas selesai tanpa ‘error’ maka perintah terakhir

#make install
#init 6

4. Menggunakan ipfw untuk membuat ACL (access control list)
Secara dasar aturan untuk ipfw sebagai berikut :

ipfw action number [allow|deny] [all|tcp|udp|ip] darimana kemana via apa

Ubah user menjadi root, contoh nya :

#su

Membolehkan localhost untuk berkomunikasi dengan dirinya sendiri :

/sbin/ipfw add 100 pass all from any to any via lo0
/sbin/ipfw add 200 deny all from any to 127.0.0.0/8

Membolehkan localhost untuk berkomunikasi ke siapa saja melalui ethernet

/sbin/ipfw add 300 allow all from IP_ANDA to any

Membolehkan koneksi normal yang sudah terhubung dengan baik

/sbin/ipfw add 350 allow tcp from any to any established

Jika anda menjalankan webserver dan mailserver, anda memerlukan port 80 dan 25 agar dapat

di akses oleh host yang lain.

/sbin/ipfw add 400 allow tcp from any to any 80
/sbin/ipfw add 500 allow tcp from any to any 25

Membolehkan data tipe udp untuk dikirimkan dari nameserver sebagai fungsi DNS :

/sbin/ipfw add 600 allow udp from DNS_SERVER 53 to IP_ANDA

Membolehkan seluruh ICMP kecuali ping :

/sbin/ipfw add 700 deny icmp from any to YOUR_IP_HERE icmptypes 8
/sbin/ipfw add 800 allow icmp from any to any

Jika anda ingin host berjalan dengan tipe firewall terbuka, tambahkan di file /etc/rc.conf

firewall_enable=”YES”
firewall_type=”OPEN”



Cara NgeBlock SSH brute force di FreeBSD

I hate ssh bruteforce !!! here i explain to you how to block bruteforce in your ssh port.
#cd /usr/ports/security/sshguard
#make fetch extract
#cd work/sshguard-1.0/src
# ee sshguard.c

change line 153-157 :
###
if (fw_fin() != FWALL_OK) sshguard_log(LOG_ERR, “Cound not
finalize firewall.”);

sshguard_log_fin();

return 0;
###

to

#####
exit(0);
######


now lets install it.
#make install clean
# ee /etc/syslog.conf
find this line
#auth.info;authpriv.info |exec /usr/local/sbin/sshguard

uncomment that line.Then restart syslogd
#/etc/rc.d/syslogd restart


Perintah Dasar FreeBSD

Bagi yang masih pemula, pasti bingung untuk mejalankan FreeBSD pada waktu setelah di innstall. Disini saya akan memberikan perintah dasar FreeBSD sebagai dasar untuk mengoperasikan FreeBSD.

Setelah anda menginstall FreeBSD dan menjalankan FreeBSD, yang akan muncul adalah permintaan login dari mesin. Login yang biasa pertama kali dipakai itu adalah login dengan user : root. Dan passwordnya adalah sesuai dengan yang anda masukkan pada waktu penginstallan. Jika anda mempunyai user/account yang baru anda buat maka anda dapat masuk ke mesin itu lewat account tersebut.

Setelah itu anda dapat mengoperasikan mesin FreeBSD anda dengan perintah-perintah berikut:

  • ‘cd’ = change directory (pindah ke directory …)
  • ‘ls’ = list (me-list semua directory dan file yang ada disuatu directory)
  • ‘rm’ = remove (menghapus suatu file)
  • ‘mkdir’ = make directory (membuat directory/folder)
  • ‘clear’ = menghapus semua layar dari perintah-perintah yang pernah kita buat
  • ‘ps’ = processing status (melihat proses yang sedang bekerja di mesin)
  • ‘kill’ = menghentikan suatu proses
  • ‘cp’ = copy (untuk mengcopy suatu file)
  • ‘whoami’ = untuk mengetahui sebagai apa kita menjalan mesin tersebut
  • ‘pwd’ = untuk mengetahui kalo kita sedang berada di directory …
  • ‘tar’ = untuk mengekstrak file compress (file nya harus bertipe .tar.gz)
  • ‘compress’ = untuk mengkompress suatu file atau directory
  • ‘whereis’ = untuk mengetahui terletak di directory mana suatu file itu berada
  • ‘mv’ = memindahkan suatu file ke directory lain atau merubah nama suatu file
  • ‘passwd’ = untuk merubah password account yang sedang dipakai
  • ‘ee’ = easy editor (suatu program editor text seperti notepad jika di Windows)

  • Lainnya :

    Selain perintah yang bersifat built-in bagi shell, UNIX menyediakan banyak utilitas yang sangat bermanfaat bagi pemakai. Pada bagian ini, beberapa perintah UNIX (built-in maupun utilitas) akan diperkenalkan. Beberapa di antaranya hanya berupa suatu ringkasan.
    Tabel Perintah lingkungan sistem
    Perintah Keterangan
    Exit Keluar dari shell pada Bourne shell dan Korn shell.
    Id Menampilkan nama pemakai beserta nomor identitas dari pemakai serta nama group dan nomor identitas group.
    logname Menampilkan nama pemakai.
    Logout Keluar dari shell pada C shell.
    Man Menampilkan dokumentasi online dari suatu perintah UNIX.
    newgrp Mengubah group efektif.
    passwd Memberikan password atau mengubah password
    Set Menampilkan variabel lingkungan pada shell pemakai.
    Tty Menampilkan nama identitas (port) terminal.
    Uname Menampilkan nama simpul dari sistem UNIX
    Who Menampilkan pemakai yang sedang menggunakan sistem.

    Tabel Perintah manajemen file
    Perintah Keterangan
    Cat Menampilkan isi file.
    Cp Menyalin satu atau beberapa file.
    Find Mencari file-file tertentu pada suatu direktori.
    Ls Menampilkan informasi dari file.
    More Menampilkan isi suatu file teks per layar.
    Mv Memindahkan suatu file ke direktori lain atau mengubah nama file.
    Pg Menampilkan isi suatu file teks per layar.
    Rm Menghapus file.

    Tabel Perintah manajemen direktori
    Perintah Keterangan
    Cd Mengaktifkan suatu direktori sebagai direktori kerja.
    Copy Menyalin seluruh struktur direktori (termasuk file dan subdirektori).
    Mkdir Membuat direktori baru.
    Pwd Menampilkan nama direktori kerja.
    Rmdir Menghapus direktori.
    Mv Mengubah nama direktori.

    Tabel Perintah untuk mengatur akses file
    Perintah Keterangan
    Chgrp Mengubah group dari suatu file atau direktori.
    Chmod Mengubah permisi dari suatu file atau direktori.
    Chown Mengubah pemilik dari suatu file atau direktori.

    Tabel Perintah yang berhubungan dengan proses
    Perintah Keterangan
    Kill Menghentikan suatu proses berdasarkan identitas proses.
    Ps Menampilkan proses-proses yang sedang berjalan.
    Sleep Menunda eksekusi (Proses yang tidak mengerjakan apa-apa selama beberapa detik).

    Tabel Perintah yang berhubungan dengan layar
    Perintah Keterangan
    Banner Menampilkan tulisan berukuran besar
    Clear Menghapus layar
    Echo Menampilkan tulisan ke layar

    Tabel Perintah lain-lain
    Perintah Keterangan
    Bc Utilitas untuk mengatur perhitungan.
    Cal Menampilkan kalender.
    Date Menampilkan tanggal dan jam sistem.
    Grep Mencari file-file yang mengandung kat tertentu.
    Lp Mencetak file ke printer.
    Mail Utilitas untuk menyampaikan pesan tertulis ke pemakai lain.
    Sort Mengurutkan kata.
    Vi Editor teks.
    Wc Menghitung jumlah karakter, kata dan baris suatu file.

    Semoga Bermanfaat !!!!!!!!!!!!!!!!!

    Membuat Mail Server "Sederhana" di Linux

    File yang dibutuhkan antara lain :

    * Arch Linux
    * Postfix 2.1.5
    Secure, fast, easy to administer drop in replacement for Sendmail.
    (MTA) Provides smtp-server.
    (Requires sasl installed and support for sasl compiled into Postfix if
    sending mail through an intermediary as you may need to do if you have
    a domain name pointing to a dynamic IP address.)
    * Cyrus SASL 2.1.21
    SASL authentication daemon.
    * Procmail 3.22
    Highly configurable auto mail processing.
    * Fetchmail 6.25
    A remote-mail retrieval utility.
    * SpamBayes 1.1a1
    a Bayesian anti-spam filter, initially based on the work of Paul Graham.
    The major difference between this and other, similar projects is the
    emphasis on testing newer approaches to scoring messages.
    * Mutt 1.4.2.1
    A small but very powerful text-based mail client
    * Courier-imap 4.0.4
    IMAP / POP3 Server
    * Courier-authlib 0.57
    Authentication library for the courier mailserver.
    * SquirrelMail cvs 1.5.1
    For checking mail via the web.
    (requires imap-server, perl, and php)
    * Pop-before-smtp 1.38
    A simple daemon written in Perl, to allow email relay control based on
    successful POP or IMAP logins.



    Installing Postfix

    A note for those with dynamic IP addresses: Before installing Postfix we must first consider if it will need to make use of Simple Authentication and Security Layer (SASL). If you have a dynamic IP address and are using a service like dyndns.org you will need to have Postfix send your mail through your ISP's mail server (with authentication) making use of SASL for the connection. This is because many domains that you will send email to will recognize your hostname as pointing to a dynamic IP address and send the mail back. Check if your distributions Postfix package was built with SASL support or if you are compiling Postfix from scratch add SASL with a ./configure option.

    If you've determined you do not need SASL support in postfix:
    $ pacman -Sy postfix

    If you do need SASL support we need to install cyrus-sasl and use the Arch Build System (abs) utility for building Postfix. Follow the instructions bellow or follow these Arch Wiki instructions: http://wiki.archlinux.org/index.php/PostFix_Howto_With_SASL
    $ pacman -Sy cyrus-sasl
    $ abs
    $ cd /var/abs
    $ mkdir -p local/postfix
    $ cp -v extra/daemons/postfix/* local/postfix

    Now edit /var/abs/local/postfix/PKGBUILD. Under the build() section change:
    make OPT="${CFLAGS}" || return 1

    to:

    make OPT="${CFLAGS}" \
    CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl/" \
    AUXLIBS="-L/usr/lib/sasl2 -lsasl2" || return 1

    Now run:
    $ makepkg
    $ pacman -A postfix-*.pkg.tar.gz

    I like to then copy the package into a directory under /var/lib/pacman so I have access to all of my abs built packages later:
    $ mkdir /var/lib/pacman/abs_built
    $ cp postfix-*.pkg.tar.gz /var/lib/pacman/abs_built
    Installing Fetchmail
    $ pacman -S fetchmail
    Installing Procmail
    $ pacman -S procmail
    Installing SpamBayes

    SpamBayes is not yet in the pacman repository. Download it, extract, and install (substitute version numbers with most current):

    $ wget http://dl.sourceforge.net/sourceforge\
    /spambayes/spambayes-1.1a1.tar.gz
    $ tar zxvf spambayes-1.1a1.tar.gz
    $ cd spambayes-1.1a1
    $ python setup.py install

    Installing Mutt
    $ pacman -S mutt
    Installing courier-imap and courier-authlib

    SquirrelMail as well as other mail clients (evolution, outlook, cell phone, etc.) will use this to connect to the mail box. Courier-imap also depends on courier-authlib, so this command will install that as well.
    $ pacman -S courier-imap
    Installing SquirrelMail
    $ pacman -S squirrelmail
    Installing pop-before-smtp

    You are going to want to consider using Postfix/TLS or pop-before-smtp if you are interested in users connected via IMAP being able to send mail (using your mail server as a SMTP relay). I recommend using Postfix/TLS but will not cover how to install/configure it in this document.

    Pop-before-smtp is not in pacman repositories. Substitute version numbers with the most current.
    $ wget http://dl.sourceforge.net/sourceforge/popbsmtp/pop-before-smtp-1.38.tar.gz
    $ tar zxvf pop-before-smtp-*.tar.gz
    $ cd pop-before-smtp-*

    Read the README in this directory and then read README.QUICKSTART in the contrib directory for where to copy the necessary files to.


    Postfix Configuration

    main.cf

    Now change to the '/etc/postfix' directory and open up main.cf for editing.

    The domain name for my machine is through dyndns.org. Set your myhostname and my domain to something like this:
    myhostname = example.com mydomain = example.com

    Next we are going to want to set Postfix up for using qmail-style delivery with Maildir (where each email is stored in its own file). This is for courier-imap which SquirrelMail will be using to access the mail and will have other advantages. Don't forget the ending forward slash.
    home_mailbox = Maildir/

    Set it up so that incoming mail is sent through procmail and so we can alias names/users to mailboxes.
    mailbox_command = /usr/bin/procmail -a "$DOMAIN"

    alias_maps = hash:/etc/postfix/aliases

    If you have a dynamic IP or have trouble with mail being returned from large ISP's or mail systems you are going to have to take a few extra steps. We will set it up so that mail will go through a relay host. In this example I will use my ISP's (SBC) smtp server as an example. Make these additional changes to main.cf
    relayhost = [smtp.sbcglobal.yahoo.com]

    # authentication for sbc yahoo
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options = noanonymous
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

    That wraps up our changes to main.cf. We just need to create the hash aliases databases that we defined above. Add these lines to the top of /etc/postfix/aliases (replacing hypexr with your user account of course):

    root: hypexr

    spam: hypexr
    ham: hypexr

    Generate the database. From /etc/postfix dir:

    $ postalias aliases

    Set up smtp server and authentication for SBC mail relay. sasl_passwd:

    smtp.sbc.mail.yahoo4.akadns.net my_username@sbcglobal.net:my_passw

    Note: Server name can change from time to time. There is a CNAME that points to this name but CNAMEs do not work here.

    Generate the database:

    $ ./postmap sasl_passwd

    Start the postfix server and we are done with postfix!!!!

    $ /etc/rc.d/postfix start

    Having problems getting it to start? Check out the Postfix log file usually in /var/log/mail or /var/log/maillog.

    Fetchmail Configuration

    We are going to run our fetchmail daemon from user root. So create the file /root/.fetchmailrc:

    set postmaster "postmaster"
    set bouncemail
    set no spambounce
    set properties ""
    set daemon 60
    poll pop.example.com with proto POP3
    user 'user_name' there with password 'my_password' is 'local_user_to_deliver_to' here options flush
    poll pop.gmail.com with proto POP3 port 995
    user 'my_gmail_un@gmail.com' there with ssl with password 'my_password' is 'hypexr' here options keep

    This tells fetchmail to check every minute for mail at pop.mypop.com and also at my gmail account. The flush option at the end of the mypop entry tells it to remove the mail after it is downloaded. I do not want the mail removed from my Gmail account so I use the keep option. Google also uses ssl, hence the "with ssl". Fetchmail comes with its configuration utility fetchmailconf which makes setting up your .fetchmailrc file easy.

    I don't believe that Arch Linux has a rc script for fetchmail. The one that I made (/etc/rc.d/fetchmail) looks like this (stat_busy, stat_fail, stat_done are specific to Arch Linux. You could take these out):

    #!/bin/sh

    . /etc/rc.conf
    . /etc/rc.d/functions

    DAEMON_NAME="fetchmail"
    DAEMON_CONF="/root/.fetchmailrc"
    DAEMON_PATH="/usr/bin/fetchmail"

    PID=`pidof -o %PPID ${DAEMON_NAME}`

    case "$1" in
    start)
    stat_busy "Starting ${DAEMON_NAME}"
    [ -z "$PID" ] && ${DAEMON_PATH} -f ${DAEMON_CONF} -d 60 &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon ${DAEMON_NAME}
    stat_done
    fi
    ;;
    stop)
    stat_busy "Stopping ${DAEMON_NAME}"
    [ ! -z "$PID" ] && kill "$PID" &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon ${DAEMON_NAME}
    stat_done
    fi
    ;;
    restart)
    # calling 'stop' and 'start' without the $0 fails...
    $0 stop
    sleep 3
    $0 start
    ;;
    *)
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

    And start the fetchmail daemon:

    $ /etc/rc.d/fetchmail start

    Or if you don't want to create/modify an rc script you can start the fetchmail daemon like:

    $ /usr/bin/fetchmail -d 60


    Spambayes and Procmail Configuration

    We are going to be using Spambayes to train and determine if mail is spam and Procmail to sort the mail into folders when they enter our mail system. These two go together as far as Procmail is going to use Spambayes to help sort the mail.

    I had used SpamAssassin for a year and had not been very happy with its performance. I have only been using Spambayes for a few weeks and have been pleasantly surprised by how well it has worked and how quickly it adapts. In fairness I had been training SpamAssassin on all of my spam, the spam it had caught and the spam it had missed as well. It was also an older version and I was not using all of the features. With that being said if you are curious give it a try. Many other excellent programs exist. A quick search on Google will turn them up.

    When Spambayes is installed it is going to move several files that start with sb_ into your /usr/bin directory. We are going to be interested in sb_mboxtrain.py and sb_filter.py. The former trains the spam filter and the later classifies incoming spam. There are two methods I tried for the initial training:

    1. Since I already had thousand of spam and ham (non spam) messages saved up I first tried initially training on this older mail. The results were okay but it was miss sorting mail. These problems would have sorted them selves out with the continued training of the misclassified mail but it would have also took a little while because the database had already been trained so much.
    2. The second method I used was extremely effective. I started out with no training on initial messages. I simply let Spambayes work with no information. I then sent the spam and ham messages that ended up in the wrong mailbox to a designated folder. I then run the Spambayes training program on these miss classified messages.

    The results from the second method have been amazing. Without even having to manually classify very many messages Spambayes has been performing at superior levels. Check out Spambayes Wiki for many other training methods. I will discuss easy methods of sorting miss classifications in the Mutt and Squirrel Mail sections.

    Spam System Initial Setup

    We are going to want Maildir folders to hold our regular mail, mail classified as spam, mail classified as unsure, missed spam, and missed ham.

    If the standard Maildir directory (~/Maildir) doesn't already exist lets create it with the necessary sub directories to make it a mail box. Run these commands from your user account who will be receiving the mail.
    $ mkdir ~/Maildir
    $ mkdir ~/Maildir/{new,cur,tmp}

    And now the other 4 directories that we are going to use for dealing with spam (Making the directories hidden is going to be done for integration with Squirrelmail):
    $ mkdir ~/Maildir/{.MissedSpam,.MissedHam,.CaughtSpam,.Unsure}
    $ mkdir ~/Maildir/.MissedSpam/{new,cur,tmp}
    $ mkdir ~/Maildir/.MissedHam/{new,cur,tmp}
    $ mkdir ~/Maildir/.CaughtSpam/{new,cur,tmp}
    $ mkdir ~/Maildir/.Unsure/{new,cur,tmp}

    The messages that we are going to be training as spam are going to be in ~/Maildir/.MissedSpam and ham will be in ~/Maildir/.MissedHam. Lets create the script and cron job that will take care of training the Spambayes db. Create a file ~/Maildir/train_spambayes and add this:

    #!/bin/sh
    # Script to copy mail missed spam and ham into correct folders
    # and run sb_mboxtrain.py to train spambayes
    # Training will be done only on missed spam and ham

    # Files we saved or bounced may be in the new directory
    # We want them in cur for training
    mv /home/hypexr/Maildir/.MissedSpam/new/* \
    /home/hypexr/Maildir/.MissedSpam/cur 2>/dev/null
    mv /home/hypexr/Maildir/.MissedHam/new/* \
    /home/hypexr/Maildir/.MissedHam/cur 2>/dev/null
    /usr/bin/sb_mboxtrain.py -d /home/hypexr/.hammie.db \
    -g /home/hypexr/Maildir/.MissedHam \
    -s /home/hypexr/Maildir/.MissedSpam

    Make the script executable:
    $ chmod +x ~/Maildir/train_spambayes

    Set up our database that will be consulted for new email and trained on new spam/ham:
    $ /usr/bin/sb_filter.py -d $HOME/.hammie.db -n

    You will want cron installed so that it can launch the script above, which trains Spambayes, every night at 3:21 am. Edit your cron jobs with the command crontab -e and add:
    21 3 * * * ~/Maildir/train_spambayes
    Procmail Configuration for Spambayes

    These are basic procmail recipes that will sort the spam from ham. From Spambayes on Unix or Linux. Add these lines to your mail recipient's ~/.procmailrc:

    SHELL=/bin/sh
    MAILDIR=$HOME/Maildir
    DEFAULT=$HOME/Maildir/
    CAUGHT_SPAM=$MAILDIR/CaughtSpam/
    UNSURE=$MAILDIR/Unsure/

    #Spambayes process
    :0fw:hamlock
    | /usr/bin/sb_filter.py -d /home/hypexr/.hammie.db

    :0
    * ^X-Spambayes-Classification: spam
    ${CAUGHT_SPAM}

    :0
    * ^X-Spambayes-Classification: unsure
    ${UNSURE}

    # Catches everything else.
    # Anything left over goes into the DEFAULT folder
    :0:
    ${DEFAULT}

    So incoming mail is not filtered through procmail's rules where Spambayes's sb_filter decides whether it is spam or ham. The mail is now sitting in the correct directories and ready to be accessed by whatever reader/front-end you would like. Next I going to describe setting up Mutt and SquirrelMail for viewing your mail. Mutt will be the most powerful option combining speed and sleekness but SquirrelMail will be able to match functionality.


    Mutt Configuration

    First we need to set the MAIL variable so that Mutt will know where to look for your mail. In your ~/.bashrc (create if does not exist) add the line:

    MAIL='~/Maildir'

    Exit out of your shell and log back in so that the variable will be set or run export MAIL='~/Maildir'. On some systems mutt will not use $MAIL to determine the location of your mail box. When trying to start mutt if it reports a message that no mail directory exists you can try setting the MAILDIR variable or just create the directory that it wants to use and make it a valid Maildir: mkdir -p ~/.maildir/{cur,new,tmp} where .maildir is the folder that mutt wants to use. If you use a directory other than ~/Maildir remember to substitute that wherever I reference Maildir in this document.

    Now for the fun part. Lets make everything look pretty and integrated in Mutt. If you start up Mutt right now you will see any mail that your system has received since you have completed the steps above. If no mail shows up in Mutt and there should be mail you need to first check if Spambayes has filtered it into your .Unsure or .CaughtSpam directories. Type 'c' to change directories and enter ~/Maildir/Unsure and check out the mail thats been classified as spam: 'c' ~/Maildir/CaughtSpam. If you still have not found the mail that you are expecting to have received make sure that you have configured Postfix, Fetchmail, and Procmail correctly. Also, try sending mail directly to your_user_accunt@example.com and see if it shows up in one of the directories above.

    Now mail is flowing into your system and we can check how Spambayes has classified it by checking the different mail folders. The miss classified mail just needs to be moved into the correct folders for the training.
    To manually move the misclassified spam mail:

    1. From you Maildir inbox tag each message that has arrived that is spam. Do this by pressing 't' and an asterisk will appear by the messages. After all of the messages have been tagged, press '; m' and enter ~/Maildir/MissedSpam and the spam messages in your inbox will be moved to the MissedSpam mailbox for training by spambayes.
    2. When looking at the mail that it has classified as spam in '~/Maildir/CaughtSpam', tag all of the messages it considered spam that were ham and press '; C' and enter ~/Maildir/MissedHam. Now tag them again and press '; m' and enter ~/Maildir to move them into your inbox, where they should have been placed in the first place.

    Of course all of this manual stuff is a huge pain so lets automate all of it in .muttrc.

    .muttrc Configuration

    This .muttrc file is going to save you a quazillion.. thats right a quiazalliona hours in productivity in dealing with our current setup. Here it is:

    # Emacs is my editor of choice. I have mostly read that people like
    # using emacs-client here and using an emacs server so that the
    # editing opens up in an existing emacs session but I prefer
    # loading up a fresh instance. The default editor is some 'vi'
    set editor="emacs"

    # Setting these macros is going to save us all of that time I was
    # talking about. Now instead of having to type all of those
    # characters to move the mail around we will can just tag the messages
    # and, for the instance of spam in your inbox, hit 'S'.

    # Move mail to correct directories
    macro index S ";s~/Maildir/.MissedSpam\r\r$\r"
    macro pager S ";s~/Maildir/.MissedSpam\r\r$\r"
    macro index H ";C~/Maildir/.MissedHam\r\r;s~/Maildir\r\r$\r"
    macro pager H ";C~/Maildir/.MissedHam\r\r;s~/Maildir\r\r$\r"
    macro index M ";s~/Maildir/\r"
    macro pager M ";s~/Maildir/\r"

    # This one lets me quickly move job search related emails to the
    # correct directory. Want to give me a job? :)
    macro index B ";s~/Maildir/.Job\r\r$\r"
    macro pager B ";s~/Maildir/.Job\r\r$\r

    # This is how we are going to move around to the different
    # mailboxes. Hitting 'alt-1' will take us to our inbox
    # 'alt-2' and we are looking at the mail Spambayes classified
    # as spam. etc.
    # The extra mailboxes I have in here are for mailing lists I am on.
    # I will show the procmail recipe that automatically puts
    # the mailing list mail into its correct mailbox further down.

    # Move to mailboxes quickly
    macro index 1 "c~/Maildir\r"
    macro pager 1 "c~/Maildir\r"
    macro index 2 "c~/Maildir/.CaughtSpam\r"
    macro pager 2 "c~/Maildir/.CaughtSpam\r"
    macro index 3 "c~/Maildir/.Unsure\r"
    macro pager 3 "c~/Maildir/.Unsure\r"
    macro index 4 "c~/Maildir/.Tur\r"
    macro pager 4 "c~/Maildir/.Tur\r"
    macro index 5 "c~/Maildir/.Sbayes\r"
    macro pager 5 "c~/Maildir/.Sbayes\r"
    macro index 6 "c~/Maildir/.Wikka\r"
    macro pager 6 "c~/Maildir/.Wikka\r"
    # Training Maildirs for Spam and Ham
    macro index 8 "c~/Maildir/.MissedSpam\r"
    macro pager 8 "c~/Maildir/.MissedSpam\r"
    macro index 9 "c~/Maildir/.MissedHam\r"
    macro pager 9 "c~/Maildir/.MissedHam\r"
    # Job E-mails
    macro index 0 "c~/Maildir/.Job\r"
    macro pager 0 "c~/Maildir/.Job\r"

    # Setting these colors makes it easy to tell which emails
    # Spambayes has missed.
    # Turn spam red and unsure green
    color index red default "~h '^X-Spambayes-Classification: spam'"
    color index green default "~h '^X-Spambayes-Classification: unsure'"
    # Turn gmail mail brightblue
    # (My regular expression is not correct here. I think that it
    # is looking anywhere in the header for my gmail address
    # instead of what I wanted.. Just in the 'To:'.
    # It still works for the most part)
    color index brightblue default "~h '(^)*my_name@gmail.com'

    # Lets set more colors to make things look beautiful. Judging by
    # my title for this section I must have had bad feelings towards
    # colors when I added this.
    #Color crap
    color index brightwhite default ~N # color for new messages
    color status black yellow
    color attachment brightyellow default # file attachments
    color search brightred default # search matches
    color quoted brightyellow default # quoted text in replies
    color quoted1 magenta default # quoted text in replies
    color body cyan default "((ftp|http|https)://|news:)[^ >)\"\t]+" # URLs
    color body cyan default "[-a-z_0-9.+]+@[-a-z_0-9.]+" # email

    # The rest of this stuff is pretty important for functionality and
    # readability.

    # Don't ask to move read message
    set move=no

    # My signature is in this file
    set signature="~/.signature"

    # Change mail to look like from scott@hypexr.org
    # Stick your email address here.
    my_hdr From: Scott Rippee

    # Header control h displays header when in pager
    # I want to only see the unignored by default
    ignore * # weed out all headers
    unignored date from: to cc subject organization # now show me these...

    # Thanks to many people whom have written the documents and posts that I
    # have gotten these settings from.

    New Mutt Commands

    Here are the most useful (as far as dealing with spam) commands that we can now use in mutt:

    t Tag messages to be manipulated
    S Send message/s to spam training folder
    H Send message/s to ham training folder and to inbox
    alt-1 Change mailbox to Maildir/ (inbox)
    alt-2 Change mailbox to .CaughtSpam
    alt-3 Change mailbox to .Unsure
    alt-8 Change mailbox to .MissedSpam
    alt-9 Change mailbox to .MissedHam

    So for example, if a couple of spam messages show up in your inbox you can now tag them and hit 'S' (remember its uppercase s) and have them vanished into .MissedSpam for training.


    SquirrelMail Configuration

    To configure SquirrelMail go into your html_base_directory/squirrelmail/config and run ./conf.pl. Edit the options to fit your needs. If you want to test your config cruise over to http://localhost/squirrelmail/src/configtest.php.

    Now go to http://localhost/squirrelmail/ and login using your user account. If you have any email in your in box you should see it after you log in. Now click on the Folders option that is along the top, select all of the mailbox folders that we created earlier (they are listed here because we prefixed them with a period), and click on subscribe. Hit refresh and the mailboxes should be listed in the side panel. Now you can use SquirrelMail for almost all of you mail needs including tagging messages and moving them to the correct folders for Spambayes training and checking on the mail that Spambayes has classified as spam and unsure. The only functionality from our mutt setup that can't be duplicated in SquirrelMail is copying missed ham into its training folder and then moving it into your inbox. This is due to the lack of copying ability. So you will have to go into the ham training folder to see some of the mail that should be in your inbox.

    !!! IMPORTANT SECURITY NOTE!!! - Using SquirrelMail like this is not secure! Sending the plain text passwords that you use for your Unix account can be accessed by by a 3rd party, which would them access to your account. You should set up a secure server with SSL and have Courier-imap use passwords that differ from the users system password using Courier Authlib, which I will demonstrate in the next session. Excellent documents exist all over the net for setting up your web server with ssl.

    Courier Authentication

    Now is a good time to address a bit of essential security. As of now when a user connects via the SquirrelMail or IMAP interface the passwords are being sent in plain text and if these are sniffed that users system account is compromised. Without adding secure connections we can minimize the threat by using alternate passwords for imap connections. The snoop would then have access to your mail, but not be able to log in to the system.

    Edit your authdaemonrc file. If your on Arch Linux this will be in /etc/authlib. Under authmodulelist I commented out:

    authmodulelist="authpam authpwd authuserdb authshadow ..."

    And replaced it with:

    authmodulelist="authuserdb"

    I believe that adding authuserdb to the front of the list may work, but I am only using this method of authentication so it is all I need in my list.

    Lets create the user account entry:

    $ userdb "some_user_name" set home=/home/user_dir \
    mail=/home/user_dir/Maildir \
    uid=users_userid gid=users_groupid

    $ userdbpw | userdb "some_user_name" set systempw

    You will now be prompted for this pseudo users new password. Next make sure that /etc/authlib/userdb has read/write/execute access for the owner. If not chmod 700 /usr/authlib/userdb. Now create the user database that courier is going to look to for authentication:

    $ makeuserdb

    Again look to using Postfix/TLS for a tunneling the connection through a secure connection.

    Pop-before-smtp Configuration

    To successfully configure pop-before-smtp follow the straight forward instructions in contrib/README.QUICKINSTALL. When you are done and everything is working it is important to make sure that you have not some how made your mail server an open relay! This would cause your mail server to be flooded with traffic and be put on the open relay ban lists.

    !!! IMPORTANT SECURITY NOTE!!! - I will not use the pop-before-smtp method because it involves sending a password over an insecure connection. Use Postfix through a SSL connection, Postfix/TLS, to accomplish this. Since your local machines are likely already allowed to use your Postfix as a mail relay the only time that you would be using this method is from a non-trusted server where you password can be sniffed. If you still choose to use this method make sure that you have changed the users courier password as described in Courier Authentication.

    Additional Simple Procmail Recipes and Mailbox Config

    If you are a member of any news letters/mailing lists you can have them automatically sorted to their own mailbox using Procmail. First create the new mail directory in your ~/Maildir directory. Lets call it .Sbayes and pretend that we are on the Spambayes mailing list. So exactly as before with the spam related mailboxes:

    mkdir -p ~/Maildir/.Sbayes/{cur,new,tmp}

    Now add this new rule to your ~/.procmailrc:

    # spambayes-dev@python.org mailing list
    :0
    * ^X-BeenThere: spambayes@python.org
    ${MAILDIR}/.Sbayes/

    In the .mutrc example above it shows an example of setting alt-5 as the macro to see your Spambayes emails.

    A slightly different method can be used to send spam and ham for training. Adding the following lines will allow you to bounce spam messages to spam@localhost (localhost or your mail_domain.com) and ham messages to ham@localhost:

    # Mail has been bounced to spam@localhost
    :0
    * ^Resent-To:.*spam
    ${MAILDIR}/.MissedSpam

    # Mail has been bounced to ham@localhost
    :0
    * ^Resent-To:.*ham
    ${MAILDIR}/.MissedHam

    If you want to bounce messages to the spam and ham addresses like this, you will need to make sure that the headers stay intact. Do not try using this or a similar technique for forwarding mails to an address because the email's headers would not be intact and this is a large part of the spam classification. This method works because above we specified spam and ham as aliases for hypexr in the Postfix aliases file.

    Conclusion

    For Arch Linux users, Add saslauthd authdaemond courier-imap postfix fetchmail to DAEMONS in your /etc/rc.conf file and they will be started automatically when your machine boots. If you are running a web server have the httpd service listed after the services we are adding.

    /etc/rc.conf

    DAEMONS=(... saslauthd authdaemond postfix courier-imap fetchmail ...)

    Enjoy your new mail system and centralized mailbox. If you are handling a large number of users for you email system this is just the tip of the iceberg and you are going to mostly be interested in virtual users, security, and a system wide spam classifier. There are many good documents on various setups to accomplish this, see the links section. If you have any suggestions, questions, comments, or corrections send me an email or drop a note in the forum. If this document has been of any use to you, cheers. :)

     

    About Me

    My photo
    Presiden Director of : Monopoly Cell Groups, Monopoly Games and Internet Lounge, Monopoly Computer : Hardware, Maintenance and Supply Computer Product, Internet Networking Company, All in Depok City ,--------------------------, Send me Email : Radarmerauke@telkom.net

    My Blog Stat :