This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Rabu, 06 Maret 2013

Instalasi dan Konfigurasi Samba di Centos 5

CentOSI. Pendahuluan
Pada tutorial sebelumnya kita sudah mengetahui tentang bagaimana mengakses data sharing antar sesama linux. Namun, kita harus menyadari bahwa tidak semua user mempunyai linux sebagai operating sistem pada komputernya. Kebanyakan dari mereka masih menggunakan windows sebagai operating sistem pada komputer mereka. Sekarang timbul pertanyaan, bagaimana cara agar user linux dapat mengakses data dari windows atau sebaliknya? Tutorial kali ini kita akan menggunakan program samba sebagai jembatan penghubung untuk mengakses data antara windows dan linux. Penulis menggunakan Centos 5.2 sebagai Operating sistem linux dan dijadikan sebagai server samba.

II. Samba
Andrew tridgell merupakan orang yang pertama kali membuat program samba dan selanjutnya dikembangkan oleh team samba. Kata samba diambil dari sebuah nama tarian yang terkenal dari Brazil. Samba merupakan kumpulan perangkat lunak untuk menyediakan layanan sistem file Microsoft dari server file Linux (Unix umumnya). Samba mengimplementasikan protokol SMB (atau CIFS) milik Microsoft untuk mengatur penggunaan file dan printer secara bersama. SMB itu sendiri merupakan protokol yang dikembangkan oleh Microsoft dan Intel untuk melakukan penggunaan bersama sumber daya dalam sistem jaringan. Dengan program samba, file yang ada pada sistem linux dapat diakses dari sistem Microsoft begitu juga sebaliknya, file yang ada pada sistem Microsft dapat diakses dari sistem Linux.

III. Konfigurasi Samba
Berikut adalah langkah-langkah untuk menginstal dan mengkonfigurasi samba di centos:
1. Cek paket
Ceklah apakah di dalam sistem kita dengan menggunakan perintah:
# rpm -qa | grep samba
samba1Jika di dalam sistem kita tidak ada paket samba, installah paket-paket samba dengan menggunakan perintah:
# yum install samba*
2. Backup file samba
Masuklah ke direktori samba dengan menggunakan perintah:
# cd /etc/samba
# cp smb.conf smb.conf.ori
3. Konfigurasi file samba
Ada banyak variasi yang bisa dilakukan oleh samba dan hal itu tergantung dari masing-masing kebijakan kantor. Namun di bawah ini, penulis mengkonfigurasi file samba yang sesuai dengan kebutuhan penulis. Dan perlu diketahui bahwa penulis menggunakan server samba pada jaringan 192.168.1.0/24 dimana IP 192.168.1.1 sebagai klien samba dengan OS windows dan IP 192.168.1.2 sebagai server samba denagn OS linux. Berikut adalah perintah untuk mengkonfigurasi file samba dan konfigurasi penulis pada file tersebut:
# vi smb.conf
# == Global Settings ==
[global]
# -- Network Related Options --
        workgroup = WORKGROUP
        server string = Samba Server
        netbios name = Samba
        interfaces = lo eth0
        hosts allow = 127. 192.168.1.
# -- Logging Options --
        log file = /var/log/samba/%m.log
        max log size = 5000
# -- Standalone Server Options --
        security = share
        passdb backend = tdbsam
# -- Domain Controller Options --
        domain master = yes
        domain logos = no
# -- Browser Control Options --
        os level = 33
        preferred master = yes
# -- Name Resolution --
        wins support = yes
# -- Printing Options --
        load printers = yes
        cups options = raw
# == Share Definitions ==
[homes]
        comment = Home Directories
        browseable = no
        writable = yes
;       valid users = %S
;       valid users = MYDOMAIN\%S
[boy]
        comment = Boy Directories
        path = /home/boy
        browseable = yes
        writable = yes
        valid users = boy
[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes
Penjelasan:
  • Workgroup: Menentukan nama identitas workgroup atau domain dan tidak dibedakan apakah itu huruf besar atau kecil. Biasanya, Windows menggunakan nama Workgroup sebagai domain sehingga harus disesuaikan oleh file samba.
  • Server string: Menetukan isi pesan yang ditampilkan pada saat klien pada saat berhasil login dalam domain.
  • netbios name: Menentukan nama yang dipakai server SMB dalam jaringan. Nama yang dipakai tidak boleh melebihi 16 karakter dan tidak boleh ada karakter spasi serta tidak mempedulikan apakah itu huruf besar atau kecil.
  • interfaces: Menentukan interface mana yang akan digunakan oleh server samba
  • host allow: Menentukan alamat IP host yang diperbolehkan mengakses server SMB
  • log file: Menentukan direktori untuk log samba
  • max log size: Menentukan ukuran maksimal ukuran log yang seharusnya dapat dicapai
  • security: menentukan level keamanan server SMB yang juga menentukan  bagaimana cara server SMB menanggapi permintaan klien. Ada 3 level yaitu:
a. share :  Klien SMB tidak perlu melakukan login sebelum menggunakan sumber daya jaringan. Autentifikasi password diperlukan pada saat user berusaha menggunakan sumber daya jaringan.
b. user   : Klien SMB harus melakukan login supaya dapat menggunakan sumber daya jaringan.
c. server : Server SMB menggunakan server SMB lain untuk melakukan validasi klien SMB dan klien SMB harus melakukan login supaya dapat menggunakan sumber daya jaringan. Pada level ini, diperlukan pengaturan nama NETBIOS server password untuk autentifikasi (password server = nama_netbios)
  • passdb backend: informasi tentang user disimpan di dalam file ini
  • domain master: Menentukan apakah server SMB dapat berfungsi sebagai browser master domain. Supaya dapat berfungsi sebagai server domain, server SMB harus dapat berfungsi sebagai browser master domain
  • domain logos: Menentukan apaka server SMB dapat berfungsi sebagai server logon domain untuk klien Windows 95 atau PDC (primary Domain Controller) bagi Windows NT dan windows 2000.
  • preferred master: Menentukan supaya server SMB dapat memaksa browser lokal pada startup dan memberi kesempatan lebih tinggi untuk memenangkan persaingan pemilihan server domain.
  • wins support: Menentukan apakah server SMB dapat berfungsi sebagai server WINS
  • load printers: Membiarkan kita me-load daftar printer-printer secara otomatis dibandingkan menyetting printer-printer tersebut secara sendiri-sendiri
  • cups options: Mengijinkan kita untuk masuk ke option cup, misalnya memilih raw  yang akan mengijinkan kita  menggunakan driver-driver di klien windows
  • comment: Menentukan teks yang akan terlihat oleh klien pada saat login
  • browseable: Menentukan akses browse bagi user lain
  • writable: menentukan akses tulis pada masing-masing user
4. Cek Konfigurasi File samba
Sebelum menjalankan server samba, sebaiknya diperiksa terlebih dahulu apakah file smb.conf sudah dituliskan secara betul atau tidak. Gunakan perintah berikut:
#testparm
dan perhatikan hasilnya: smb1
5. Menyalakan Server SMB
Untuk menjalankan server SMB, harus dijalankan dua daemon yaitu daemon smbd dan nmbd. Daemon smbd yaitu daemon server yang menyediakan layanan share file dan share printer untuk klien smb serta dapat melayani klien Windows 9x, ME, 2000, OS/2, DAVE Macintosh dan smbfs linux. Daemon nmbd yaitu daemon server yang digunakan untuk permintaan layanan nama NetBIOS bagi klien SMB dan dapat mengerti serta dapat menjawab permintaan layanan nama NETBIOS melalui IP. Daemon ini juga dapat digunakan sebagai server WINS yang akan melakukan penciptaan database dari permintaan registrasi nama yang diterima dan menjawab semua query dari klien SMB untuk nama tersebut. Dan juga untuk meneruskan query broadcast dari klien yang tidak memahami bagaimana cara berhubungan antara server WINS dengan suatu server Windows. Untuk menjalankan keduanya, gunakan perintah:
# service smb start
6. Membuat Password user Samba
Sesudah mensetting konfigurasi di file smb.conf, maka kita harus membuat password samba untuk user. Di konfigurasi di atas sudah dibuat contoh user boy yang dimasukkan ke dalam file smb.conf. Namun hal itu tidak berarti apa-apa jika kita belum membuat password samba untuk mereka. Format password samba adalah sebagai berikut:
# smbpasswd -a nama_user
Kalau menggunakan contoh diatas, maka format tersebut akan berubah menjadi:
# smbpasswd -a boy
Dan perlu diketahui bahwa password user samba bisa berbeda dengan password login user. Kalau sudah berhasil membuat password, maka cobalah di windows pada bagian address ketik:
\192.168.1.2
Maka folder boy akan tampak. Double klik folder boy, maka kita akan disodori password untuk mengakses ke folder tersebut seperti pada gambar di bawah.
smb2
Jika sesudah mengetik \\192.168.1.2 tidak ada folder-folder mereka maka cobalah restart samba dengan perintah:
# service smb restart
Sekarang cobalah membuat user baru misal bernama joko dan tambahkan di file smb.conf konfigurasi seperti konfigurasi pada boy atau bisa berkreasi sesuai kehendak kita agar kita lebih paham. Sesudah selesai, buatlah password samba untuk joko dan restart samba maka lihat apa yang akan terjadi. Dan perlu diingat, bahwa jika kita merubah sesuatu di file smb.conf atau di sistem samba, maka kita harus selalu merestart service samba.
7. Tes di Linux
Kalau samba sudah berhasil berjalan dan kita ingin mengakses file di windows dari sistem linux, maka ketikkan pada bagian Location atau address:
smb://192.168.1.1
Dan folder-folder yang sudah diijinkan di sharing akan terlihat disana.
8. Utiliti Samba
Samba mempunyai utiliti-utiliti yang dapat digunakan klien untuk mengakses server SMB diantaranya adalah utiliti smbclient. Utiliti ini digunakan untuk berhubungan dengan server SMB dan dapat memberikan informasi tentang server SMB tersebut Format yang digunakan adalah:
# smbclient -L nama_server_smb
atau
# smbclient -L alamat_IP
nama_server_smb dapat dilihat di file smb.conf di bagian netbios name. Pada saat perintah  di atas diberikan, server SMB akan minta masukan untuk password yang digunakan. Tekan saja enter yang berarti maksudnya anonymous. smbclient
Format diatas bisa dimodifikasi menjadi:
# smbclient -L nama_server_smb -U nama_user
atau
# smbclient -L alamat_IP -U nama_user
smbclient2
9. Troubleshooting
Terkadang kita ingin merubah atau lupa dengan password samba yang dahulu sudah kita gunakan. Untuk merubah password samba, gunakan perintah berikut:
# smbpasswd nama_user
Dalam kasus kita:
# smbpasswd boy
Setelah itu restart service samba. Kemudian, kita dapati di windows kita ada error seperti berikut ketika kita hendak membuka folder boy:
\192.168.1.2\boy is not accessible. You might not have permission to use this network resource. Contact the administartor of this server to find out if you have access permissions.
The specified network password is not correct.
smb3
Hal ini karena windows masih terhubung dengan server samba dan masih menyimpan password user samba yang lama. Untuk mengatasi hal tersebut, maka di dalam windows pada area toolbar pilih Tools lalu pilih Disconnect Network Drives.
smb4
Lalu muncul pop-up. Klik drivenya lalu tekan OK.
smb5
Setelah itu, seharusnya user samba dapat memasukkan passwordnya yang baru.

Referensi:
Jaringan Komputer Teori dan implementasi Berbasis Linux, Wagito, Penerbit Gava Media, Cetakan I, 2005

Jumat, 01 Maret 2013

Load Balancing over Multiple Gateways

 

sumber : http://wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
 
The typical situation where you got one router and want to connect to two ISPs:
Dual gw 01.jpg
Of course, you want to do load balancing! There are several ways how to do it. Depending on the particular situation, you may find one best suited for you.

Policy Routing based on Client IP Address

If you have a number of hosts, you may group them by IP addresses. Then, depending on the source IP address, send the traffic out through Gateway #1 or #2. This is not really the best approach, giving you perfect load balancing, but it's easy to implement, and gives you some control too.
Let us assume we use for our workstations IP addresses from network 192.168.100.0/24. The IP addresses are assigned as follows:
  • 192.168.100.1-127 are used for Group A workstations
  • 192.168.100.128-253 are used for Group B workstations
  • 192.168.100.254 is used for the router.
All workstations have IP configuration with the IP address from the relevant group, they all have network mask 255.255.255.0, and 192.168.100.254 is the default gateway for them. We will talk about DNS servers later.
Now, when we have workstations divided into groups, we can refer to them using subnet addressing:
  • Group A is 192.168.100.0/25, i.e., addresses 192.168.100.0-127
  • Group B is 192.168.100.128/25, i.e., addresses 192.168.100.128-255
If you do not understand this, take the TCP/IP Basics course,
or, look for some resources about subnetting on the Internet!
We need to add two IP Firewall Mangle rules to mark the packets originated from Group A or Group B workstations.
For Group A, specify
  • Chain prerouting and Src. Address 192.168.100.0/25
  • Action mark routing and New Routing Mark GroupA.
Dual gw 22.jpg
It is a good practice to add a comment as well. Your mangle rules might be interesting for someone else and for yourself as well after some time.
For Group B, specify
  • Chain prerouting and Src. Address 192.168.100.128/25
  • Action mark routing and New Routing Mark GroupB
Dual gw 25.jpg
All IP traffic coming from workstations is marked with the routing marks GroupA or GroupB. We can use these marks in the routing table.
Next, we should specify two default routes (destination 0.0.0.0/0) with appropriate routing marks and gateways:
Dual gw 26.jpg
This thing is not going to work, unless you do masquerading for your LAN! The simplest way to do it is by adding one NAT rule for Src. Address 192.168.100.0/24 and Action masquerade:
Dual gw 28.jpg
Test the setup by tracing the route to some IP address on the Internet!
From a workstation of Group A, it should go like this:
C:\>tracert -d 8.8.8.8

Tracing route to 8.8.8.8 over a maximum of 30 hops

  1     2 ms     2 ms     2 ms  192.168.100.254
  2    10 ms     4 ms     3 ms  10.1.0.1
  ...
From a workstation of Group B, it should go like this:
C:\>tracert -d 8.8.8.8

Tracing route to 8.8.8.8 over a maximum of 30 hops

  1     2 ms     2 ms     2 ms  192.168.100.254
  2    10 ms     4 ms     3 ms  10.5.8.1
  ...
You can specify the DNS server for workstations quite freely, just make it can be reached (test it by tracing the route to DNS server's IP address)!

Kamis, 28 Februari 2013

Cara Block Situs di Mikrotik Lewat Winbox

Setelah kemarin Saya bahas tentang cara blokir situs pada komputer yang menggunakan sistem operasi Microsoft Windows, kali ini Saya akan tuliskan juga tutorial untuk cara blokir situs di sistem operasi Mikrotik Router dengan menggunakan tool Winbox. Baik langsung saja pada tutorial caranya, silahkan di simak....

Cara Block Situs di Mikrotik Lewat Winbox
  • Buka winbox yang berada pada desktop.
 
  • Klik tanda  ( … ) atau isi alamat Mikrotik pada kolom Connect To :
  • Maka akan muncul gambar seperti di bawah ini, kemudian pilih salah satu.

  • Setelah itu isi Username dan Passwort Mikrotik

  • Kemudian klik tanda connect.
  • Dan akan terbuka jendela Mikrotik seoerti gambar di bawah ini.
  • Untuk block situs klik menu IP pilih Web Proxy

  • Kemudian Setting Web Proxy dengan mengeklik tombol Setting.
  • Maka akan muncul jendela seperti gambar di bawah ini. Setting Web Proxy sepeti gambar di bawah ini, kemudian di klik tombol OK.

  • Sekarang kita mulai buat settingan website yang akan di block.Klik tanda ( + ), Maka akan muncul jendela, dan kemudia setting seperti gambar di bawah ini.


  • Kemudian klik OK, maka akan muncul catatan pada jendela Web Proxy.

  • Coba cek settingan tersebut dengan mengetikan kata “porno” pada google.

  • Dan kemudian enter, jika muncul tampilan seperti gambar di bawah ini maka settingan block situs Anda berhasil.

 Demikian tutorial blokir situs di Mikrotik dari Saya, Selamat mencoba dan semoga bermanfaat.......

Rabu, 27 Februari 2013

Install phpMyAdmin in CentOS 5

sumber : http://www.khattam.info/howto-install-phpmyadmin-in-centos-5-2010-09-25.html
I am using CentOS 5 in one of my Virtual Servers and I wanted it to have phpMyAdmin. I tried installing it by doing yum install phpmyadmin but it said No package phpmyadmin available. So I add to add a repo. I discovered that rpmforge repo had this package. To add it, I executed the following commands:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.i386.rpm
If you have 64-bit version installed, you should try this one out:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
If you get a 404 Not Found, then you will need to figure out the latest updated version of repo url from rpmforge usage page.
After that, you may like to update your packages by doing this:
yum update
and then continue installing phpmyadmin
yum install phpmyadmin
It should ask you for confirmation and you can continue installing phpMyAdmin with dependencies.
When installation is done, you can edit /etc/httpd/conf.d/phpmyadmin.conf and allow it to be opened from anywhere and not just the same computer. You are going to need this if you have installed it in a remote virtual server.
To do so, open up /etc/httpd/conf.d/phpmyadmin.conf using:
nano /etc/httpd/conf.d/phpmyadmin.conf
You will see:
<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Directory>
Just change the line “Allow from 127.0.0.1″ to “Allow from [yourip]“, where [yourip] is IP address of your computer if you have public static IP. Otherwise, you can also set it to “Allow from all”.
Press Ctrl+O followed by Enter to save and Ctrl+X to exit nano.
Now, you must restart apache. To do so, run
service httpd restart
Now, you can access phpMyAdmin by visiting http://vps_server_IP_or_domain/phpmyadmin. But you will get the following error:
Error
The configuration file now needs a secret passphrase (blowfish_secret).
To make it work, you will need to edit config.inc.php. To do so, type in:
nano /usr/share/phpmyadmin/config.inc.php
Find a line saying:
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS
FOR
COOKIE AUTH! */
Fill in any secret keyword there, eg mysecretpassphrase, so that it looks like:
$cfg['blowfish_secret'] = 'mysecretpassphrase'; /* YOU MUST FILL IN THIS
FOR
COOKIE AUTH! */
and then save it.
If you don’t have mysql server installed, you will get the following error:
Error
#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)
To install mysql-server, just run:
 yum install mysql-server
and then start it:
 service mysqld start
Then change the root password:
mysqladmin -u root password PASSWORD_HERE
Now, you will have to remove phpmyadmin:
yum remove phpmyadmin
and reinstall it again:
yum install phpmyadmin
Then you will need to edit the config.inc.php again to enter blowfish secret (see above). Then, you can login.
If however, you want phpMyAdmin to connect to a remote server, you can change the line by replacing localhost with your server IP:
$cfg['Servers'][$i]['host'] = 'localhost';
Hope this helps.

Kamis, 21 Februari 2013

How To Install Clam Antivirus On Cent OS 5

sumber : http://www.ravisaive.in/2011/07/how-to-install-clam-antivirus-on-cent.html

ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats. It is the de facto standard for mail gateway scanning. It provides a high performance mutli-threaded scanning daemon, command line utilities for on demand file scanning, and an intelligent tool for automatic signature updates. The core ClamAV library provides numerous file format detection mechanisms, file unpacking support, archive support, and multiple signature languages for detecting threats.


Download and Install Clam Antivirus on Cent OS 5

1. We use RPMForge repo to install Clam Antivirus with using YUM command below.
[root@ravisaive ~]# yum install clamd
2. After Sucessfull installation start the clamd service by using below command.
[root@ravisaive ~]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: Bytecode: Security mode set to "TrustSigned".
LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
                                                          [  OK  ]
3. If you get error similar to below shown while starting ClamAv Service. Then follow our solution below to fix this error.
[root@ravisaive]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: ERROR: Can't open /var/log/clamav/clamd.log in append mode (check permissions!).
ERROR: Can't initialize the internal logger
                                                          [FAILED]
4. To fix this error you must set the owner and group to clamav to the file /var/log/clamav/clamd.log. here is the below command to set.
[root@ravisaive]# chown clamav:clamav /var/log/clamav/clamd.log
5. Then try to start the service again with below command.
[root@ravisaive]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: Bytecode: Security mode set to "TrustSigned".
LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
                                                           [  OK  ]
6. Now update Clam Virus Database by using below command, It will download latest ClamAV update. If you get same permission error like above then set the owner and group as clamav to the file /var/log/clamav/freshclam.log with chown command as shown below.
[root@ravisaive]# chown clamav:clamav /var/log/clamav/freshclam.log
[root@ravisaive ~]# freshclam
7. Now test and Scan Clam Antivurs with below command to see results.
[root@ravisaive ~]# clamscan
LibClamAV Warning: ******************************************************
LibClamAV Warning: ***      Virus database timestamp in the future!   ***
LibClamAV Warning: ***  Please check the timezone and clock settings  ***
LibClamAV Warning: ******************************************************
/root/install.log.syslog: OK
/root/.bash_profile: OK
/root/anaconda-ks.cfg: OK
/root/.bash_logout: OK
/root/.tcshrc: OK
/root/.dmrc: OK
/root/.bash_history: OK
/root/.bashrc: OK
/root/.cshrc: OK
/root/install.log: OK

----------- SCAN SUMMARY -----------
Known viruses: 1000080
Engine version: 0.97.1
Scanned directories: 1
Scanned files: 10
Infected files: 0
Data scanned: 0.05 MB
Data read: 0.02 MB (ratio 2.00:1)
Time: 3.765 sec (0 m 3 s)

How To Install MailScanner On Cent OS 5

 
MailScanner is a highly-respected an open source e-mail security system for use on Unix e-mail gateways and was first released in 2001. It protects against viruses spam and security vulnerabilities. It is distributed under the GNU General Public License.

Lets install required packages through RPMforge a third party RPM repository for Red Hat Enterprise Linux or CentOS. Adding the RPMforge repository will give you access to an extensive library of precompiled binaries. This article describes how to add the RPMforge repository in Red Hat Enterprise Linux or CentOS 5.

Download and Install RPMforge

1. Download and Install RPMforge repository with wget command
[root@ravisaive yum.repos.d]# wget rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

[root@ravisaive home]# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
warning: rpmforge-release-0.3.6-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]
2. Install RPMforge Repo by using YUM properties using yum command.
[root@ravisaive home]# yum install yum-priorities
3. Now Open file /etc/yum.repos.d/rpmforge.repo and add below line at the end.
priority=10
4. Test your configuration by using below command. You get a priority protections message in the output.
[root@ravisaive home]# yum check-update

Download and Install MailScanner

1. Go to http://www.mailscanner.info/downloads.html and Download the stable version for Cent OS or you can download using the wget command below.
[root@ravisaive home]# wget http://www.mailscanner.info/files/4/rpm/MailScanner-4.83.5-1.rpm.tar.gz
2. Now extract the download file by using below command.
[root@ravisaive home]# tar -xvf MailScanner-4.83.5-1.rpm.tar.gz
3. After extracting you will get a folder MailScanner-4.83.5-1 use cd command to go inside the folder like shown below.
[root@ravisaive home]# cd MailScanner-4.83.5-1
4. Now install required Perl modules from RPMforge using YUM command like shown below
[root@ravisaive MailScanner-4.83.5-1]# yum install perl-Archive-Zip perl-DBI perl-DBD-SQLite perl-Filesys-Df perl-Net-CIDR perl-OLE-Storage_Lite perl-Sys-Hostname-Long
5. Now install Mailscanner with below command.
[root@ravisaive MailScanner-4.83.5-1]# yum install --nogpgcheck mailscanner*

Thats It! Your Mailscanner is installed....

Intalasi SquirrelMail pada Centos 5.3

A.  Pengantar
Squirrelmail merupakan aplikasi webmail berbasis PHP. Aplikasi ini sifatnya open source, instalasinya cukup mudah. Dalam pembahasan ini penulis mengimplementasikan Squirrelmail pada Centos 5.3. Ada dua jenis protocol yang digunakan untuk mengakses email yang berada pada mail server, yaitu dengan menggunakan POP (Post Office Protocol) dengan port 110 ataupun dengan web base email dengan menggunakan IMAP (Internet Message Access Protocol) dengan port 143. POP sudah memasuki versi 3 atau dikenal dengan POP3, dengan POP3 maka email dapat diambil dari server dan disimpan di email client seperti outlook expres, dan Eudora. Untuk yang menggunakan mail berbasis web, interaksi dengan email server dari sisi pengguna bisa dilakukan lewat squirrelmail, horde, yahoo, dan Gmail.
picture12 
Gambar logo SquirrelMail
Sendmail adalah Mail Transfer Agent (MTA) yang secara default  digunakan oleh  Linux. Peran utama dari sendmail adalah untuk mengirimkan pesan, baik secara lokal maupun remote, dimana pengiriman dilakukan melalui protokol SMTP (Simplae Mail Transfer Protocol) dengan port 25.
B.  Instalasi
Install paket squirrelmail
[root@localhost html]# yum install squirrelmail
Pindahkan direktori squirrelmail ke document root (/var/www/html) :
[root@localhost ~]# cp -r /usr/share/squirrelmail/ /var/www/html/
Konfigurasi file yang ada pada folder config :
[root@localhost ~]# cd /var/www/html/squirrelmail/
[root@localhost squirrelmail]# cd config/
Hapus file config.php dan config_local.php :
root@localhost config]# rm -rf config.php
[root@localhost config]# rm -rf config_local.php

Buat simbolink link baru pada folder config :
[root@localhost config]# ln -s /etc/squirrelmail/config.php
[root@localhost config]# ln -s /etc/squirrelmail/config_local.php

Hasil instalasi dapat diakses lewat : http://ip-server/squirrelmail
 picture21
 Instalasi IMAP/POP3 :
Download paket IMAP :
[root@localhost ~]# wget ftp://ftp.dit.upm.es/mirrors/
ftp.rediris.es/mirror/fedora-legacy/fedora/1/os/i386/imap-2002d-3.i386.rpm

Install paket IMAP
[root@localhost ~]# rpm -ivh imap-2002d-3.i386.rpm
Kalau ada error seperti ini :
Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
libcrypto.so.4 is needed by imap-1:2002d-3.i386
libssl.so.4 is needed by imap-1:2002d-3.i386
maka install dulu paket ini :
[root@localhost ~]# yum install openssl097a
[root@localhost ~]# yum install xinetd

Baru ulangi lagi :
[root@localhost ~]# rpm -ivh imap-2002d-3.i386.rpm
Konfigurasi IMAP:
[root@localhost ~]# vim /etc/xinetd.d/imap
Ubah disable =yes menjadi disable =no
Konfigurasi pop3:
[root@localhost ~]# vim /etc/xinetd.d/ipop3
Ubah disable =yes menjadi disable =no
Jalankan xinetd :
[root@localhost ~]# /etc/init.d/xinetd start
Testing Login:
Pastikan port 110 untuk pop3 dan port 143 untuk IMAP sudah berjalan dengan cara :
[root@localhost ~]# nmap localhost
User login untuk IMAP adalah user linux, sekarang coba menambahkan user teguh dan santo.
[root@localhost ~]# adduser teguh
[root@localhost ~]# adduser santo

Untuk merubah password gunakan perintah :
[root@localhost ~]# passwd teguh
[root@localhost ~]# passwd santo

Coba login dengan salah satu user, tampilan setelah login adalah :
 picture31
Gambar tampilan login
C. Instalasi MTA
Supaya email bisa dikirimkan maka harus diinstal MTA dengan menggunakan sendmail. Caranya adalah :
[root@localhost ~]# yum install sendmail
Jalankan service send mail :
[root@localhost ~]# service sendmail start
D. Testing e-mail
Untuk instalsi mail server ini, uji coba pengiriman email hanya dilakukan untuk lokal saja tanpa melibatkan mail server remote.
User teguh akan mengirimkan email kepada user santo, hasil pengecekan email oleh user santo adalah :
picture41 
Gambar email yang diterima
Sampai disini instalasi SquirrelMail telah selesai dan berjalan dengan baik, semoga tulisan ini membantu.

Rabu, 20 Februari 2013

SquirrelMail Configuration Easy Steps (SquirrelMail + Sendmail + Apache On RedHat/CentOS/Fedora)

 http://www.howtoforge.com/squirrelmail-configuration-easy-steps-squirrelmail-sendmail-apache-redhat-centos-fedora
http://www.howtoforge.com/squirrelmail-configuration-easy-steps-squirrelmail-sendmail-apache-redhat-centos-fedora-p2
http://www.unixmen.com/installing-dovecot-and-squirrelmail-in-centos-a-sientificlinux/


This tutorial explains how you can install and configure SquirrelMail on a RedHat/CentOS/Fedora based mail server which uses Sendmail and Apache.
Scenario:
Primary Mail Server:  linuxbox4 (192.168.0.14)
Domain Name:     abc.com
Trusted IP Pool:     192.168.0.0/24
Note:  Replace domain name and system name and IP according to your scenario.

Prerequisites:

1.  DNS is configured with proper MX record.
2.  All necessary packages/ softwares are installed.

Step 1:

Configure all service to start at boot time.
chkconfig sendmail on
chkconfig httpd  on
chkconfig dovecot on

Step 2:

Configure /etc/hosts file. In this scenario /etc/hosts file should look like this:
192.168.0.14    linuxbox4   www.abc.com 

Step 3:
Outgoing Mail Server Configuration (Sendmail):
Open /etc/mail/sendmail.mc file and change the following two lines.
From:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 
FEATURE(`accept_unresolvable_domains')dnl 
To:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 
dnl FEATURE(`accept_unresolvable_domains')dnl 
Save and exit.
- First line here enables sendmail to receive incoming emails on all installed the NICs. Otherwise mail server would only be able to receive mails from it.
- Second line here tells sendmail, do not receive emails from mail servers whose PTR record is not configured in DNS server. This is a basic level SPAM control settings in sendmail.
Generate sendmail.cf file from sendmail.mc file.
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Step 4:

Allow RELAY for trusts (organization's) IP addresses that you want to permit sending emails using this mail server. Open /etc/mail/access in this file we specify all those addresses that will be sending emails through this mail server. At the end of this file add the following line:
192.168.0 RELAY 
Save and exit and convert this text database into DB format by following command.
makemap hash access.db < access

Step 5:

Tell sendmail that it will be acting as a primary mail server for "abc.com" domain. We do this by adding domain name in /etc/mail/local-host-names. If this server is acting as a mail server for more then one domains then add names of all of the domains in this file on separate line. Open /etc/mail/local-host-names and add "abc.com" at the end of this file.
Note: A mail server can act as a primary mail server for more then one domains at the same time and as well as can act as a primary and secondary mail server for more than one domain at the same time.

Step 6:

All system users are mail users as well. Now create mail only users.
useradd -s /usr/sbin/smrsh mailuser1
useradd -s /usr/s2n/smrsh mailuser1
Also set their passwords:
passwd mailuser1
passwd mailuser2

Step 7:

Finally restart sendmail service.
service sendmail restart

Step 8:

Incoming Mail Server Configuration (Dovecot):
Open /etc/dovecot.conf and change the following lines. 
From:
#protocols = imap  pop3 
To:
protocols = imap imaps pop3 pop3s  
Save and exit and restart dovecot service.
service dovecot restart


Step 9:

Webserver Configuration (Apache):
Apache  comes  pre-configured, you  just  have  to  change the ServerName parameter  in /etc/httpd/conf/httpd.conf  file and restart the service, that’s all. Open /etc/httpd/conf/httpd.conf  and set the ServerName parameter.
ServerName www.abc.com 
Save and exit and restart httpd service.
service httpd restart

Installation & Configuration of Squirrelmail    

•  Check that Squirrelmail is installed on the system.
# rpm –q squirrelmail
•  If squirrelmail is not installed on the system then install it through rpm:
# rpm –ivh squirrelmail
•  Now go to the squirrelmail directory, located in /usr/share.
# cd /usr/share/squirrelmail
•  Then go to the config directory:
# cd config
•  Now run one of the following commands to configure squirrelmail.
# ./conf.pl
OR
perl conf.pl
•  Now select option 1 (Organization Preferences).
Organization Name  :  YOUR_ORG_NAME
Organization Title  :  YOUR_ORG_NAME Webmail 
Provider link    :  http://YOUR_ORG_SITE_ADDRESS
Provider name  :  YOUR_ORG_NAME
•  Now select option 2 (Server Settings). 
Domain                   :  abc.com
Sendmail or SMTP :  Sendmail
IMAP Server          :  localhost
IMAP Port               :  143
Server software     :  uw
Delimiter                :  /
•  Now select option 3 (Folder Settings).
Default Folder Prefix                : mail/
Show Folder Prefix Option       : true 
Trash Folder                            : Trash
Sent Folder                              : Sent
Drafts Folder                           : Drafts
By default, move to trash        : true
By default, move to sent         : true
By default, save as draft          : true

List Special Folders First         : true
Show Special Folders Color    : true
Auto Expunge                          : true
Default Sub. of INBOX            : false
Show 'Contain Sub.' Option    : true
Default Unseen Notify             : 2
Default Unseen Type              : 1
Auto Create Special Folders   : true

Folder Delete Bypasses Trash  : false
Enable /NoSelect folder fix   : false
•  Now select option 4 (General Settings).
Data Directory                       : /var/lib/squirrelmail/prefs/
Attachment Directory            : /var/spool/squirrelmail/attach/
Directory Hash Level            : 0
Default Left Size                   : 150
Usernames in Lowercase     : false
Allow use of priority              : true
Hide SM attributions             : false
Allow use of receipts            : true
Allow editing of identity        : true
Allow editing of name          : true
Remove username from header : false
Allow server thread sort       : true
Allow server-side sorting     : true
Allow server charset search : true
Enable UID support             : true

PHP session name              : SQMSESSID
Location base                       :
•  Now choose option 8 (Plugins) and select the plugins that you wish to provide to your webmail users.
•  Now open the browser with the following link: 
http://YOUR_SITE_ADDRESS/webmail
OR
http://192.168.0.14/webmail