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.

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

Senin, 18 Februari 2013

Install webmin on CentOS 5


On CentOS 5.8 make sure that iptables is either turned on, or you have port 10000 (default) open to be accessed
If you do not have wget installed on your CentOS box, type:  

yum install wget

from there download and install Webmin from sourceforge by using the following command:

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.580-1.noarch.rpm

once downloaded, run the following command to install:

rpm -i webmin-1.580-1.noarch.rpm

this should take a minute or so for it to install.
once installed successfully browse to https://ipaddress:10000, log in with your root username/password



*note* if you are installing on a higher version of CentOS like 6.2 do not use https, use normal httpd

That’s It! If you found this article helpful, please consider donating to keep the blog running

Centos Sebagai Gateway dan Proxy Server

Gateway merupakan perangkat yang digunakan sebagai pintu keluar menuju jaringan internet dari jaringan LAN yang berada di bawahnya, gateway menjalan fungsi Network Address Translation (NAT) yang memungkinkan untuk melakukan translasi alamat gateway sebagai alamat yang digunakan oleh semua client dari jaringan LAN untuk mengakses jaringan internet.
Agar centos linux bisa digunakan sebagai gateway server maka kita terlebih dahulu harus mengaktifkan fungsi ip forward yang digunakan untuk meneruskan paket data dari client menuju internet, untuk mengaktifkan ip forward ada dua cara yang dapat dilakukan, yang pertama adalah dengan perintah berikut
# echo “1” > /proc/sys/net/ipv4/ip_forward
agar fungsi ip forward selalu di aktifkan setiap kali kompuer di hidupkan maka kita harus menambahkan perintah di atas ke dalam file /etc/rc.local. Cara kedua untuk mengaktifkan fungsi ip forward adalah dengan mengedit file /etc/sysctl.conf, cari dan hilangkan tanda pagar (comment) dari opsi berikut
#net.ipv4.ip_forward=1
sehingga menjadi seperti berikut
net.ipv4.ip_forward=1
Setelah fungsi ip forward telah aktif maka langkah selanjutnya adalah mengaktifkan fungsi NAT menggunakan iptables, untuk mengaktifkan fungsi NAT dengan iptables ada dua cara, yaitu dengan menggunakan fungsi MAQUERADE dan Source NAT, untuk mengaktifkan fungsi NAT dengan fungsi MASQUERADE adalah sebagai berikut
# /sbin/iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -o eth0 -j MASQUERADE
cara kedua untuk mengaktifkan fungsi NAT adalah dengan fungsi Source NAT, adalah sebagai berikut
# /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j SNAT --to-source 65.100.75.100
Copykan Scriptnya agar sewaktu Router di Restart peritnah Routing tidak hilang
#vi /etc/rc.local
kemudian copy scriptnya
iptables -t nat -A POSTROUTING -0 eth0 -j MASQUERADE
Skrip di atas diletakkan di atas exit 0. 
dengan perintah iptables di atas maka client pada jaringan dengan ip 192.168.1.0/24 akan di kenal di internet dengan ip gateway, yaitu dengan alamat ip 65.100.75.100, ini berguna untuk menghemat penggunaan ip public, karena kita hanya membutuhkan satu alamat ip public saja untuk seluruh jaringan LAN kita agar dapat mengakses internet.

Proxy Server

Proxy umumnya digunakan untuk memberikan layanan caching ke jaringan lokal, dengan mengunakan squid cache client-client proxy tidak perlu mengakses langsung halaman web yang ditujunya, melainkan cukup dengan mengambilnya di cache server (proxy), cara kerjanya adalah ketika ada client yang mengkses suatu alamat web, maka squid akan menyimpan file-file halaman web tersenut ke dalam cache lokal proxy tersebut untuk kemudian diberikan lagi kepada client yang mengakses halaman web yang sama, ketika ada client yang mengakses halaman web yang sama proxy server hanya melakukan pengecekan ke server yang dituju, apakah obyek yang disimpan di cache local proxy masih sama dengan yang ada di server web tujuan, apabila ternyata telah ada perubahan barulah proxy server memintakanya untuk client yang mengakses server web tujuan, sementara itu file yang diberikan kepada client tersebut juga akan disimpan di direktori cache pada proxy sever, dan begitu seterusnya sehingga secara tidak langsung metode ini akan menghemat bandwidth dan secara tidak langsung akan mempercepat koneksi internet, selain fungsi diatas proxy server juga dapat digunakan untuk membuat kebijakan keamanan untuk jaringan lokal. Aplikasi proxy server yang paling populer digunakan adalah squid, dikarenakan squid memiliki tingkat performa yang baik dan keamanan yang relatif lebih baik daripada aplikasi-aplikasi proxy server lainya.

Instalasi Paket Squid dari Repository

Untuk memudahkan kita dalam menginstall squid proxy server maka kita akan menggunakan instalasi squid dari repository dengan menggunakan yum, adapun cara instalasi squid melalui yum adalah sebagai berikut
# yum install squid
jika tidak terjadi keslahan dalam proses instalasi maka seharusnya squid telah terinstal dengan baik di sistem kita, untuk melekukan pengecekan file-file hasil instalasi squid kita dapat menggunakan perintah rpm berikut
# rpm -ql squid
dengan perintah diatas maka akan terlihat dimana saja file-file instalasi squid yang baru saja kita install diletakan di sistem kita.

Instalasi Squid dari Source

Alasan yang sering digunakan oleh para administrator untuk lebih memilih melakukan instalasi squid dari source adalah untuk lebih menyesuaikan opsi-opsi instalasi yang bertujuanya adalah meningkatkan performa squid itu sendiri, sebelum kita menginstall squid dari source tentunya kita membutuhkan source squid yang nantinya akan kita compile, souce squid dapat kita unduh dari http://squid-cache.org, setelah source squid kita dapatkan maka selanjutny dalah mengekstraknya dengan perintah berikut
# tar -xvzf squid-2.7.STABLE7.tar.gz
Setelah proses ekstrak selesai maka selanjutnya kita masuk ke direktori hasil ekstrak dan jalankan perintah configure untuk mensetup squid sebelum kita install
# cd squid-2.7.STABLE7
# ./configure
Untuk melihat opsi-opsi apa saja yang bisa kita tambahkan ketika kita menjalankan perintah configure, kita bisa menggunakan perintah berikut
# ./configure –help
Setelah itu jika tidak terjadi error lanjutkan dengan menjalankan perintah make untuk meng kompilasi squid
make
Kemudian install dengan perintah make install
make install 

Konfigurasi Squid

Setalah proses instalasi squid proxy server selesai maka yang harus kita lakukan selanjutnya adalah menyesuaikan konfigurasi default squid agar sesuai dengan kebutuhan kita, adapun file konfigurasi squid pada distribusi CentOS Linux terdapat di /etc/squid/squid.conf. Berikut adalah beberapa opsi-opsi konfigurasi dasar yang harus kita sesuaikan
Access Control list (ACL)
acl local_net src 192.168.1.0/24
http_access allow local_net
Opsi diatas dapat dijelaskan sebagai berikut : Pernyataan acl *local_net src* menunjukan jaringan local kita yang akan kita perbolehkan untuk mengakses mesin proxy server, sebagai contoh disini kita hanya akan mengizinkan jaringan 192.168.1.0/24 yang diperbolehkan mengakses proxy server Pernyataan http_access allow local_net harus diletakan sebelum baris http_access deny all. berikut contoh penggunaan acl dalam squid
acl local_net src 192.168.1.0/24
http_access allow localhost
http_access allow local_net
http_access deny all
Logging
Secara default squid akan membuat beberapa file log (catatan) yang berhubungan dengan aktifitas squid itu sendiri, dan berikut adalah konfigurasi default squid yang digunakan
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log none
Dengan opsi diatas squid akan menyimpan pesan-pesan error dalam file /var/log/squid/cache.log, kemudian informasi akses dari client akan disimpan dalam file access_log /var/log/squid/access.log dan pada bagian opsi cache store log karena tidak terlalu penting maka kita dapat menonaktifkanya dengan mengisikan opsi none sehingga menjadi cache_store_log none

Cache Managemen

Pada bagian ini merupakan opsi konfigurasi yang digunakan untuk melakukan manajemen cache, adapun opsi penting yang harus kita perhatikan adalah sebagai berikut
cache_dir ufs /var/spool/squid 100 16 256
Keterangan opsi diatas adalah menentukan letak (path) dari direktori cache yang akan kita gunakan, sedangkan ufs merupakan metode cache storing yang nantinya akan digunakan, ada beberapa metode yang dapat digunakan dalam opsi ini, yaitu ufs,aufs dan diskd, opsi selanjutnya menentukan besaran ukuran directori yang nantinya disitu akan dialokasikan untuk menaruh cache squid, ukuran yang digunakan disini adalah MegaByte(MB), sehingga apabila kita mengisinya dengan 100, maka berarti kita akan mengalokasikan direktori untuk meletakan cache squid sebesar 100MB, opsi selanjutnya adalah jumlah directori tree yang akan kita buat dalam directory cache, pada contoh diatas kita mengisinya dengan 16 dan 254, maka artinya di dalam direktori cache nantinya akan memiliki jumlah direktori sebanyak 16 dan masing-masing direktori akan memiliki sub direktori sebanyak 254.

Berkomunikasi Dengan Proxy Server Eksternal

Squid mempunyai fasilitas yang memungkinkan kita untuk menghubungkan proxy server kita dengan proxy server lain (eksternal)tentunya dengan tujuan untuk meningkatkan performa caching agar lebih baik. Metode komunikasi antar proxy server yaitu dengna menggunakan port ICP yang menggunakan protokol UDP, sehingga atara beberapa proxy server yang saling terhubung bisa saling bertukar cache file, adapun model yang dapat digunakan ada dua macam, yaitu parent dan sibling.

Parent

Pada model ini berarti proxy kita hanya akan meminta ke proxy yang berfungsi sebagai parent, apabila obyek yang dicari ditemukan maka obyek itu akan kita mintakan dari cache parent proxy kita, namun tidak sebaliknya, opsinya adalah sebagai berikut
cache_peer ip_parent_proxy type (parent|sibling) proxy_port icp_port opsi
Contoh penggunaan dari parent proxy adalahsebagai berikut
cache_peer 10.55.1.50 parent 3128 7 no-query
keterangan dari opsi diatas adalah sebagai berikut, cache_peer merupakan opsi yang digunakan agar proxy server kita bisa berkomunikasi dengan proxy eksternal, ip 10.55.1.50 disini merupakan parent proxy yang akan kita mintai cache file-nya, parent merupakan type dari proxy peer (parent| sibling), 3128 merupakan proxy port, 7 merupakan ICP port dan no-query merupakan contoh opsi yang dapat kita gunakan, yang berarti kita tidak akan meminta icp (icp query)

Sibling

berbeda dengan type parent, pada tipe ini berarti kita akan saling bertukar cache file antara proxy server kita dan proxy server eksternal yang akan kita ajak bekerja sama, penggunaan opsi pada type ini hampir sama, hanya saja pada bagian parent kita ganti dengan sibling agar proxy kita dan proxy eksternal bisa saling bertukar cache, contoh penggunaan opsi sibling
cache_peer 10.55.1.50 sibling 3128 7 no-query

Content Filtering Menggunakan Squid

Selain difungsikan sebagai cache server, squid juga dapat sekaligus berfungsi sebagai content filtering untuk mengeblok alamat-alamat situs yang tidak boleh di akses oleh client. Opsi yang digunakan pada dasarnya adalah hanya dengan mamanfaatkan fitur ACL pada squid, contoh penggunaannya adalah sebagai berikut
acl block dstdomain "/etc/squid/block"
http_access deny block
Sedangkan isi dari file /etc/squid/block adalah alamat-alamat situs yang akan kita larang untuk di akses oleh clien proxy, contoh isi file block adalah sebagai berikut
rapidshare.com
facebook.com
friendster.com
indowebster.com
Setelah ini maka alamat-alamat yang terdapat di dalam file /etc/squid/block tidak akan dapat diakses lagi oleh client dengan pesan error access denied, selain alamat-alamat yang dapat kita block sebenarnya kita juga dapat memblok eksternsi-ekstensi file yang akan kita larang untuk di akses oleh client dengan jam dan pada hari-hari tertentu, berikut adalah contoh untuk memblock beberapa ekstensi file yang akan kita larang untuk di akses oleh client pada jam dan hari tertentu
acl blok url_regex -i \.mpeg$ \.avi$ \.mpg$ 
acl jam_kerja time MTWHF 08:00-16:00
http_access deny blok jam_kerja Keterangan opsi diatas adalah sebagai berikut : kita akan menolak client mengakses file-file dengan ekstensi mpeg, avi dan mpg pada hari senin sampai jumat (MTWHF) mulai jam 08-14.

Otentikasi

Otentikasi pada squid dapat digunakan untuk memberi batasan user-user mana saja yang boleh mengakses proxy server dan user mana yang diperbolehkan, untuk mengaktifkan otentikasi kita memerlukan otentikator yang akan menangangi urusan otentikasi, berikut adalah contoh konfigurasi squid untuk menangani otentikasi menggunakan metode otentikasi NCSA
auth_param basic program /usr/local/libexec/ncsa_auth /etc/squid/auth_squid
acl ugos proxy_auth REQUIRED
http_access allow ugos
Dari opsi konfigurasi diatas dapat dijelaskan sebagai berikut : Opsi auth_param basic program merupakan parameter otentikasi, /etc/squid/auth_squid merupakan file dimana kita akan meletakan daftar user yang akan kita perbolehkan untuk menggunakan squid, pada bagian acl ugos proxy_auth REQUIRED dan http_access allow ugos merupakan format acl squid untuk penanganan autantikasi yang berarti selain user yang terautentikasi maka tidak akan di izinkan untuk menggunakan proxy squid, dan berikut adalah konfigurasi autentikasi dengan menggunakan ldap
/usr/lib/squid/squid_ldap_auth -b "dc=domain,dc=com" -f "uid=%s" ldap.server.com
dimana ldap.server.com merupakan ldap server yang memberikan layanan autentikasi, pada opsi ini kita bisa menggunakan ip server ldap atau domainya.

Konfigurasi Tranparent Proxy

Transparent proxy merupakan metode dimana kita menempatkan proxy server diantara jaringan LAN dan jaringan internet kemudian semua koneksi web dari jaringan LAN yang menuju inernet akan secara otomatis di belokan untuk dipaksa melalui proxy server kita, metode ini akan mempermudah kita dalam melakukan pengaturanya, karene dengan menggunakn metode ini kita tidak harus menseting cient satu-persatu untuk menggunkan proxy server, dan metode ini sangat cocok untuk penerapkan kebijakan keamanan krena client mau atau tidak mau harus melewti proxy untuk mengkses internet, dan berikut adalah seting squid dan juga iptables untuk konfigurasi transparent proxy. Agar squid bisa menjalankan fungsi transparent proxy maka kita peru menmbahkan beris berikut ada file konfigurasi squid
http_port 3128 transparent
kemudian kita harus menambahkan rules iptables berikut :
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
/sbin/iptables -t nat -A PREROUTING -i eth0 -p udp --dport 80 -j REDIRECT --to-port 3128
dengan menggunakan rules diatas meka semua koneksi (tcp/udp) yang menuju port 80 akan secara otomatis di belokan ke port proxy server (3128).

Menjalankan Squid

Ketika kita pertama kali akan menjalankan squid maka kita harus menjalankan perintah berikut agar squid membuat file cache terlebih dahulu.
# squid -z
Kemudian untuk menjalankan squid kita dapat menggunakan perintah berukut
# /etc/inint.d/squid start
atau menggunakan perintah servce
/sbin/service squid start
atau apabila kita menginstall squid dari source maka kita menjalankan squid dengan perintah berikut
/usr/local/sbin/squid
Kemudin untuk mematikan service squid jalankan peritah berikut
/etc/inint.d/squid stop 
atau dengan menggunakan perintah service
/sbin/service squid stop
atau apabila kita menginstall squid dari source maka jalankan perintah berikut
/usr/local/sbin/squid -k shutdown
Apabila tidak terdapat error dalam file konfigurasi seharusnya squid telah berjaan dengan baik.

Rabu, 13 Februari 2013

Installation Of Zimbra Collaboration Suite

sumber : http://www.howtoforge.com/zimbra-collaboration-suite-open-source-edition-on-centos-p3

 
You will need to download ZCS from the Zimbra website.
cd /tmp
 wget http://files.zimbra.com/downloads/5.0.2_GA/zcs-5.0.2_GA_1975.RHEL5.20080130221917.tgz 
Next untar, change into the directory of the installer and run the installer.
tar xvzf zcs-5.0.2_GA_1975.RHEL5.20080130221917.tgz
cd zcs-5.0.2_GA_1975.RHEL5.20080130221917
./install.sh
The output should look something like:
Checking for existing installation...
zimbra-ldap...NOT FOUND
zimbra-logger...NOT FOUND
zimbra-mta...NOT FOUND
zimbra-snmp...NOT FOUND
zimbra-store...NOT FOUND
zimbra-apache...NOT FOUND
zimbra-spell...NOT FOUND
zimbra-proxy...NOT FOUND
zimbra-archiving...NOT FOUND
zimbra-cluster...NOT FOUND
zimbra-core...NOT FOUND
Read through the license agreement and hit enter.
The output should be similar to:
Checking for prerequisites...
NPTL...FOUND
sudo...FOUND sudo-1.6.7p12-10
libidn...FOUND libidn-0.6.5-1.1
fetchmail...FOUND fetchmail-6.3.6-1.1
gmp...FOUND gmp-4.1.4-10
compat-libstdc++-296...FOUND compat-libstdc++-296-2.96-138
compat-libstdc++-33...FOUND compat-libstdc++-33-3.2.3-61
libtool-ltdl...FOUND libtool-ltdl-1.5.22-6.1
/usr/lib/libstdc++.so.6...FOUND
Prerequisite check complete.
Checking for standard system perl...
perl-5.8.8...FOUND start system perl-5.8.8

Checking for installable packages

Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-proxy
Next you need to select the packages to install. The defaults are listed in teh brackets so you can just press enter for every question.
Install zimbra-ldap [Y]

Install zimbra-logger [Y]

Install zimbra-mta [Y]

Install zimbra-snmp [Y]

Install zimbra-store [Y]

Install zimbra-apache [Y]

Install zimbra-spell [Y]

Install zimbra-proxy [N]
You will see a warning like this:

You appear to be installing packages on a platform different
than the platform for which they were built

This platform is CentOS5
Packages found: zimbra-core-5.0.2_GA_1975.RHEL5-20080130221917.i386.rpm
This may or may not work

Install anyway? [N] Y

The system will be modified. Continue? [N] Y
The installation takes a little bit so if you are running low on coffee or need a potty break now is the time to take it. :)
Once the install is finished you are presented with the Main Menu. It looks like this:
Notice the asterisks next to the Admin Password. You need to set the Admin Password before you complete the install. To do this enter 3 at the prompt and hit enter. The menu changes to:
Now you choose 4. You will be prompted to change the password. After you change the password hit r which will take you back to the previous menu. Enter a at the prompt to save the configuration.
The installation will complete and you will be all set to access the administrative web interface.

6 ZCS Admin Web Interface

 
Just like Falko I'm just going to give a brief screenshot tour and leave it up to you to get more information from the Zimbra Admin Guide and the Zimbra Wiki.

6.1 Administration Login

You can access the admin web interface by going to https://you.domain.com:7071.
Note: The web interface is accessed via ssl. Make sure you put https otherwise you won't be able to access the site.

The web interface is fairly easy to navigate.

The best place to start is with domains. Right now you most likely have a domain like mail.geekdept.com. You are going to want people to send email to geekdept.com. So click on domains.

After you have added your domain you are probably going to want to add an email account. Click on accounts and add your first account.

There are a ton of features you can add. By default the Instant Messenger feature is turned off but I think it is a really cool feature. It works really well.

6.2 User Login

Now that you have an email account setup you can access the user interface. Point your browser to http://your.domain.com.

Log in with your full email address and the password that you set for it.

Send some test emails to another email account to verify that it is working properly.
You are all set! As long as you have setup your external mx records properly you should be good to go. Spend some time on the Zimbra Wiki and Forums and when you master it help others out.

7 Links

Zimbra: http://www.zimbra.com
CentOS: http://www.centos.com
Zimbra Documentation: http://www.zimbra.com/community/documentation.html
Zimbra Wiki: http://wiki.zimbra.com