RSS
 

Mounting LVM (Logical Volume Manager) Disk using Ubuntu Live CD

24 Sep

Mounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, because the solution is here…….

1. Get a live cd, for example, Ubuntu. For this article, I use Ubuntu 10.04 (I cannot find any latest version of ubuntu at my place)

2. Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.
# apt-get install lvm2

3. To make sure the harddisk is recognised, you can use fdisk
# fdisk -lu

4. Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu
# pvscan
PV /dev/sda2 VG VolGroup00 lvm2 [74.41 GB / 32.00 MB free]
Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]

5. After that run vgscan to scan disks for volume groups.
# vgscan
Reading all physical volumes. This may take a while…
Found volume group “VolGroup00″ using metadata type lvm2

6. Activate all volume groups available.
# vgchange -a y
2 logical volume(s) in volume group “VolGroup00″ now active

7. Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.
# lvscan
ACTIVE ‘/dev/VolGroup00/LogVol00′ [72.44 GB] inherit
ACTIVE ‘/dev/VolGroup00/LogVol01′ [1.94 GB] inherit

8. Mount the partition to any directory you want, usually to /mnt
# mount /dev/VolGroup00/LogVol00 /mnt

9. You can access the partition in the /mnt directory and can backup your data

source:

http://linuxwave.blogspot.com

 
27 Comments

Posted in Komputer

 

Squid Macet karena Cache Membengkak

16 Aug

Jam 7.15 pagi ini squid yang kami pasang macet. Penyebabnya adalah space pada cache directory squid sudah penuh, sehingga cache directory-nya perlu dibersihkan.

Untuk mengatasi penuhnya space pada cache directory bisa dilakukan dengan perintah:

  • Login ke SuperUser:
    • $sudo su
  • Jika squid masih berjalan, matikan dengan:
    • # squid -k shutdown
  • Hapus cache directory, sesuaikan dengan yang ada pada squid.conf:
    • # rm -rf /home/proxy/cache/*
  • Buat swap file baru:
    • # squid -z
  • Kemudian jalankan kembali squid:
    • # squid -D

Selain dengan langkah diatas, bisa juga dilakukan dengan menghapus file swap.state yang terdapat pada cache directory. Kemudian buat kembali swap file baru dan jalankan kembali squid-nya.
Semoga bermanfaat…

 
2 Comments

Posted in Linux

 

Konfigurasi Cisco ASA 5505 dengan Dual ISP Backup Connection

08 Aug

Artikel ini akan menjelaskan bagaimana cara mengkonfigurasi Cisco ASA 5505 Firewall untuk menghubungkan dua ISP untuk kebutuhan Redundansi.

Skenarionya, kita mempunyai dua buah koneksi ISP yaitu : ISP utama berkecepatan tinggi dan ISP backup dengan kecepatan lebih rendah.  Jika koneksi ISP utama gagal, maka koneksi ISP backup akan  dijadikan jalur alternatif.

Harap dicatat, bahwa skenario ini akan bekerja untuk outbond traffic, yakni traffic dari jaringan internal menuju ke jaringan eksternal (internet). Dan fungsi ini akan berjalan pada ASA 5505 versi 7.2(1) atau di atasnya.

Dengan asumsi, kita tentukan:

  • IP Address Public untuk : ISP Utama : 100.100.100.1 dan Backup ISP : 200.200.200.1.
  • Ethernet 0/0 untuk ISP Utama,
  • Ethernet 0/1 untuk koneksi ke Internal LAN, dan
  • Ethernet 0/2 untuk Backup ISP.

Kita tentukan akan membuat 3 VLAN untuk mendukung konfigurasi ini:

  • VLAN1 (default Vlan) untuk Ethernet 0/1 (inside),
  • VLAN2  untuk Ethernet 0/0 (ISP Utama), dan
  • VLAN3 untuk Ethernet 0/2 (Backup ISP).

Kita juga perlu mengkonfigurasi dua static routing default yang menuju ke gateway address dari ISP. Default route dari ISP Utama harus mempunyai metric 1 dan default route dari backup ISP harus mempunyai metric yang lebih besar dari 1 (katakanlah 2).

Mari kita lihat konfigurasi di bawah ini:

  1. ASA5505(config)# interface ethernet 0/0
  2. ASA5505(config-if)# switchport access vlan 2
  3. ASA5505(config-if)# no shutdown
  4. ASA5505(config)# interface ethernet 0/1
  5. ASA5505(config-if)# switchport access vlan 1
  6. ASA5505(config-if)# no shutdown
  7. ASA5505(config)# interface ethernet 0/2
  8. ASA5505(config-if)# switchport access vlan 3
  9. ASA5505(config-if)# no shutdown
  10. ASA5505(config)# interface vlan 1
  11. ASA5505(config-if)# nameif inside
  12. ASA5505(config-if)# security-level 100
  13. ASA5505(config-if)# ip address 192.168.1.1 255.255.255.0
  14. ASA5505(config-if)# no shutdown
  15. ASA5505(config)# interface vlan 2
  16. ASA5505(config-if)# nameif primary-isp
  17. ASA5505(config-if)# security-level 0
  18. ASA5505(config-if)# ip address 100.100.100.1 255.255.255.0
  19. ASA5505(config-if)# backup interface vlan 3
  20. ASA5505(config-if)# no shutdown
  21. ASA5505(config)# interface vlan 3
  22. ASA5505(config-if)# nameif backup-isp
  23. ASA5505(config-if)# security-level 1
  24. ASA5505(config-if)# ip address 200.200.200.1 255.255.255.0
  25. ASA5505(config-if)# no shutdown
  26. ASA5505(config)# route primary-isp 0.0.0.0 0.0.0.0 100.100.100.2 1
  27. ASA5505(config)# route backup-isp 0.0.0.0 0.0.0.0 200.200.200.2 2

 

Source : http://www.articlesbase.com/networks-articles/configure-a-cisco-asa-5505-with-dual-isp-backup-connection-877852.html

File PDF dapat diunduh di Konfigurasi Cisco ASA 5505 dengan Dual ISP Backup Connection

 
2 Comments

Posted in Komputer

 

How to Configure Local SPAN Port on Cisco Catalyst Switch

07 Aug

Cisco SPAN port is a SwitchPort ANalyzer on the cisco catalyst that allows to select and span or copy traffic from one or more source switchports or source VLANs onto one or more destination ports. The destination port(s) runs a sniffing or a packet capture program like Ethereal, Wireshark or TCPDump.

Cisco IOS support Local SPAN and Remote SPAN (RSPAN).

A local SPAN is the one where the source VLANs, source switchports and the destination switchports are on the same physical switch.

Remote SPAN (RSPAN) A remote SPAN is the one where the source VLANs, Switchports and Destination ports can be on a different switches on the network.

The following procedure configures a SPAN session with SPAN Source and Destination:

1. Set the Source Interface/Vlan to SPAN from Global Configuration mode:

CiscoSwitch(config)# monitor session 1 source interface fa0/1 both

2. Set the Destination Interface for the SPAN

CiscoSwitch(config)# monitor session 1 destination interface fa0/2

The above configures SPAN Source port on fastethernet0/1 for ingress and egress traffic in step 1. All traffic here will be copied to the SPAN destination port fastEthernet0/2 configured on step 2.

The source can a single interface, a range of interfaces, a list of interfaces or a single VLAN, range of VLANs and list of VLANs.

The destination can be an interface, a range of intrerfaces or a list of interfaces where a sniffer or a packet capture device is capturing traffic.

Traffic copied on the source port can be ingress only, egress only or both.

To verify the setup of SPAN sessions:

CiscoSwitch# show monitor session 1

or

CiscoSwitch# show monitor session 1 detail

To configure a range of source interfaces for only ingress traffic (traffic received)

CiscoSwitch(config)# monitor session 1 source interface fa0/1-5 rx

To configure a list of source interfaces for egress traffic (traffic outbound):

CiscoSwitch(config)# monitor session 1 source interface fa0/1, 0/7 tx

To configure a list of destination SPAN ports:

CiscoSwitch(config)# monitor session 1 destination interface fa0/11, 0/17

Source :

http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.1E/native/configuration/guide/span.html#wp1047048

File PDF dapat diunduh di How to Configure Local SPAN Port on Cisco Catalyst Switch

 
5 Comments

Posted in Komputer

 

Tips Mereset Konfigurasi Cisco Catalyst Switch 2960

31 Jul

Langkah 1
Konfigurasi PC untuk console ke cisco catalyst switch dengan parameter koneksi hyper terminal sbb:

  • 9600 baud rate
  • No parity
  • 8 data bits
  • 1 stop bit
  • No flow control

Langkah 2
Matikan power (cabut kabel power) switch, kemudian tekan tombol mode dan tahan seiring dengan menghidupkan (masukkan kabel power) ke switch. Lama menekan tombol mode sekitar 8-10 detik kemudian lepas dan muncul informasi di console seperti dibawah

The system has been interrupted prior to initializing the flash file system.The following commands will initialize the flash file system, and finish loading
the operating system software:

flash_init
load_helper
boot

Langkah 3
Ketikkan flash_init tekan enter kemudian load_helper tekan enter dan dir flash: untuk melihat isi dalam flash:

Langkah 4
Pastikan pada langkah 3 terdapat file config.text di direktori flash: file ini berisi informasi configurasi sebelumnya. Kemudian lakukan backup sementara file config.text ke config.old dengan mengetikkan perintah rename flash:config.text flash:config.old. Jika berhasil file config.text akan berubah nama menjadi config.old, lihat dengan perintah dir flash:

Langkah 5
Restart switch dengan perintah boot
Setelah proses booting selesai, akan muncul prompt switch> artinya prosedur reset password telah berhasil dan lakukan segera perubahan password yang diinginkan. Jika ingin mengembalikan konfigurasi sebelumnya yang telah ada, lakukan perintah rename flash:config.old flash:config.text

Perhatian:
Saat proses booting ketik no saat ada pertanyaan berikut
Continue with the configuration dialog? [yes/no]

Langkah 6

Isikan konfigurasi sesuai keinginan Anda.

Semoga Sukses!!!

 
1 Comment

Posted in Komputer

 

Bandwidth Manajemen di Mikrotik menggunakan Mode Bridge

20 Jul

Dengan asumsi mikrotik mempunyai 2 interface dan akan difungsikan sebagai bandwidth manager yang berjalan pada interface bridge (TransparentTrafficShaper).

Pertama buat interface bridge dan masukan kedua interface fisik ke dalam bridge
/ interface bridge
add name=”bridge1″

/ interface bridge port
add interface=ether1 bridge=bridge1
add interface=ether2 bridge=bridge1

Untuk Mikrotik versi 3 dan yang lebih baru jalankan perintah berikut untuk melewatkan bridge paket ke dalam “ip firewall”
/ interface bridge settings
set use-ip-firewall=yes

Tambahkan alamat ip yang akan kita atur bandwidthnya ke dalam address list
/ ip firewall address-list add address=192.168.1.230 list=mine
/ ip firewall address-list add address=192.168.1.232 list=swc
/ ip firewall address-list add address=192.168.1.233 list=kary
/ ip firewall address-list add address=192.168.1.240 list=utama

Buat rules mangle untuk alamat ip yang akan kita atur bandwidthnya
/ ip firewall mangle add chain=forward src-address-list=mine action=markconnection new-connection-mark=mine-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=mine action=markconnection new-connection-mark=mine-down passthrough=no

/ ip firewall mangle add chain=forward src-address-list=swc action=markconnection new-connection-mark=swc-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=swc action=markconnection new-connection-mark=swc-down passthrough=no

/ ip firewall mangle add chain=forward src-address-list=kary action=markconnection new-connection-mark=kary-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=kary action=markconnection new-connection-mark=kary-down passthrough=no

/ ip firewall mangle add chain=forward src-address-list=utama action=markconnection new-connection-mark=utama-up passthrough=no
/ ip firewall mangle add chain=forward dst-address-list=utama action=markconnection new-connection-mark=utama-down passthrough=no

Buat Queue untuk masing-masing host
/queue tree add name=mine-up parent=global-in packet-mark=mine-down limit-at=32 max-limit=64
/queue tree add name=mine-down parent=global-in packet-mark=mine-down limitat=32 max-limit=64

/queue tree add name=swc-up parent=global-in packet-mark=swc-down limit-at=32 max-limit=64
/queue tree add name=swc-down parent=global-in packet-mark=swc-down limitat=32 max-limit=64

/queue tree add name=kary-up parent=global-in packet-mark=kary-down limit-at=32 max-limit=64
/queue tree add name=kary-down parent=global-in packet-mark=kary-down limitat=32 max-limit=64

/queue tree add name=utama-up parent=global-in packet-mark=utama-down limit-at=32 max-limit=64
/queue tree add name=utama-down parent=global-in packet-mark=utama-down limitat=32 max-limit=64

Selain itu, bisa juga digunakan Simple Queue semisal seperti berikut:

/queue simple name=”kary” target-addresses=192.168.1.233/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=3M/3M max-limit=3M/3M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small

/queue simple name=”utama” target-addresses=192.168.1.240/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=0/0 max-limit=0/0
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small

/queue simple name=”swc” target-addresses=192.168.1.232/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=2M/2M max-limit=2M/2M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small

Dan bisa juga ditambahkan simple queue yang lain semisal:

/queue simple name=”raja” target-addresses=192.168.1.241/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=1M/1M max-limit=1M/1M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small

/queue simple name=”riset” target-addresses=192.168.1.236/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=2M/2M max-limit=2M/2M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small

/queue simple name=”cisco” target-addresses=192.168.1.244/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=512k/512k
max-limit=512k/512k burst-limit=0/0 burst-threshold=0/0
burst-time=0s/0s total-queue=default-small

/queue simple name=”lab” target-addresses=192.168.1.245/32 dst-address=0.0.0.0/0
interface=all parent=none direction=both priority=8
queue=default-small/default-small limit-at=256k/256k
max-limit=256k/256k burst-limit=0/0 burst-threshold=0/0
burst-time=0s/0s total-queue=default-small

 
2 Comments

Posted in Komputer

 

Install Nagios di Ubuntu

20 Jul

Nagios adalah tool network monitoring system open source yang terbaik. Nagios bersifat modular, mudah digunakan, dan memiliki skalablitas tinggi. Modul atau plugin pada nagios sangat simple. Anda pun dapat membuatnya guna melengkapi system checking pada nagios sesuai dengan kebutuhan Anda. Untuk mendownload source nagios klik url ini http://www.nagios.org/download/. Nagios awalnya didesain untuk berjalan pada sistem operasi Linux, namun dapat juga berjalan dengan baik hampir di semua sistem operasi unix.

Fitur-­fitur yang tersedia pada Nagios diantaranya adalah:
• Monitoring network services (SMTP, POP3, HTTP, NNTP, PING, dsb.)
• Monitoring resources dari host (processor load, disk usage, dsb.)
• Desain plugin sederhana sehingga user dapat membangun service checks sendiri dengan mudah.
• Pengecekan service secara paralel
• Mampu mendefinisikan konfigurasi jaringan menggunakan “parent” hosts, sehingga memungkinkan pendeteksian antar host jika terjadi down atau ketika unreachable
• Dapat memberikan notifikasi kepada Admin ketika terjadi masalah (via email, pager, atau metode yang lain)
• Dapat mendefinisikan event handlers saat service berjalan atau host events sehingga dapat digunakan sebagai proactive problem resolution
• Automatic log file rotation
• Mendukung implementasi redundant monitoring hosts
Web interface pilihan untuk melihat current network status, notification dan problem history, log file, dsb.

Instalasi Nagios
Persiapan yang dibutuhkan untuk instalasi Nagios adalah Host Mesin dengan sistem operasi Ubuntu (pada kasus ini menggunakan versi Ubuntu Server 10.04 64Bit ) dapat juga menggunakan linux versi lain.

Sedangkan langkah-langkah instalasinya cukup mudah, berikut adalah urutannya:

1. Installasi Web server
Nagios membutuhkan web server untuk monitoring via web (Web Base), sehingga apabila host sudah terpasang web server, maka langkah ini bisa di lewati.

Disini kita menggunakan web server Apache
Command :

apt-get install apache2

2. Installasi PHP
Setelah web server terinsatall , selanjutnya software yang kita butuhkan adalah PHP
Command :

apt-get install php5-common php5 libapache2-mod-php5

3. Installasi Nagios
Command:

apt-get nagios3

4. Konfigurasi Nagios
Setelah tahapan instalasi nagios3 selesai, sebenarnya dapat langsung dicoba, tetepai untuk menyesuaikan terhadap penelitian kali ini, maka diperlukan beberapa konfigurasi,
Ganti konfigurasi “/etc/nagios3/nagios.cfg”

check_external_commands = 0
admin_email = root@localhost

Ganti check_external_commands=1 untuk mengaktifkan eksternal command dan ganti “root@localhost” dengan alamat email kita misalnya admin@stikom.edu

5. Menambah host
Kita dapat dengan mudah menambahkan host dengan menambahkan file config pada direktori “/etc/nagios3/config.”

# A simple configuration file for monitoring the local host
# This can serve as an example for configuring other servers;
# Custom services specific to this host are added here, but services
# defined in nagios2-common_services.cfg may also apply.
#

define host{
use generic-host ; Name of host template to use
host_name localhost #ganti dengan nama host(bebas)
alias localhost #ganti dengan nama host(bebas)
address 127.0.0.1 #ganti dengan IP Address host baru
}

# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Disk Space
check_command check_all_disks!20%!10%
}

# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.

define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Users
check_command check_users!20!50
}

# Define a service to check the number of currently running procs
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.

define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Users
check_command check_users!20!50
}

# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 processes.

define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Total Processes
check_command check_procs!250!400
}

# Define a service to check the load on the local machine.

define service{
use generic-service ; Name of service template to use
host_name localhost #ganti sesuai nama host
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}

Beri nama file config dengan ekstensi “.cfg” dan boleh diberi nama bebas. Jangan lupa untuk merestart nagios setelah selesai menambahkan host baru, sehingga nagios akan membaca ulang host membernya.
Command :

/etc/init.d/nagios3 restart

Mengakses Nagios
Untuk mengakses nagios, kita memerlukan web browser dengan memasukkan url http://ipataudomain/nagios3 misalnya http://10.10.10.139/nagios3 akan muncul dialog login :

Default user adalah : nagiosadmin, sedangkan passwordnya sesuai password yang diset sewaktu proses instalasi. Apabila berhasil maka akan tampil homepage sebagai berikut,

Sumber : http://nospc.com/installasi-nagios-pada-ubuntu

 
No Comments

Posted in Linux

 

Instalasi MRTG di Ubuntu

20 Jul

MRTG (Multi Router Traffic Grapher) adalah aplikasi yang digunakan untuk memantau beban trafik pada link jaringan. MRTG akan membuat halaman HTML berisi gambar GIF yang mengambarkan trafik melalui jaringan secara harian, mingguan, bulanan dan tahunan. Sebelum menginstall MRTG pertama yang harus di perhatikan adalah untuk instalasi snmp. Setelah snmp sudah jalan semua barulah kita jalankan MRTG.
Simple Network Management Protocol (SNMP) adalah standar manajemen jaringan pada TCP/IP. Gagasan di balik SNMP adalah bagaimana supaya informasi yang dibutuhkan untuk manajemen jaringan bisa dikirim menggunakan TCP/IP. Protokol tersebut memungkinkan administrator jaringan untuk menggunakan perangkat jaringan khusus yang berhubungan dengan perangkat jaringan yang lain untuk mengumpulkan informasi dari mereka, dan mengatur bagaimana mereka beroperasi.

Berikut cara installasi dan konfigurasi MRTG

Pertama buka terminal, kemudian login sebagai root
#sudo –i

Pastikan ubuntu anda sudah terhubung ke repository baik melalui jaringan maupun melalui DVD.
Install Apache2, sebagai webservernya.
#apt-get install apache2

Install aplikasi SNMP dan SNMPD dengan cara berikut;
#apt-get install snmp snmpd

Kemudian edit file snmpd.conf, dengan perintah berikut:
#nano /etc/snmp/snmpd.conf

Lalu ubah parameter berikut;
# sec.name source community
com2sec paranoid default public
#com2sec readonly default public
#com2sec readwrite default private
Menjadi:
# sec.name source community
#com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

Dan parameter berikut;
Syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
Menjadi:
Syslocation PPTI Lt.8
syscontact Administrator <admin@stikom.edu>

Restart services snmpd dengan perintah berikut;
#/etc/init.d/snmpd restart

Lakukan test dengan snmpwalk dengan perintah berikut;
#snmpwalk –c public –v 1 localhost

Install aplikasi MRTG dengan perintah berikut;
#apt-get install mrtg

Buat directory mrtg di /var/www
#mkdir /var/www/mrtg

Lalu kita buat file konfigurasi mrtg yang dihasilkan oleh snmpd dengan perintah;
#cfgmaker public@localhost > /etc/mrtg.cfg

Setelah itu kita buat file indexnya dengan cara;
#indexmaker –output=/var/www/mrtg/index.html /etc/mrtg.cfg

Lalu jalankan MRTG dengan perintah;
#mrtg

Apabila ada pesan error yang menyatakan bahwa anda harus menjalankan perintah berikut:
#env LANG=C /usr/bin/mrtg

Untuk melihat grafik yang di tampilkan oleh MRTG, maka buka browser seperti firefox. Akses http://localhost/mrtg
Maka akan muncul halaman web yang menampilkan grafik dari penggunaan bandwidth

 
2 Comments

Posted in Linux

 

5 Langkah Apache Virtual Hosts di Ubuntu

17 Jul

In this tutorial I’ll walk you through setting up 3 Apache virtual hosts running on a single Ubuntu server. An Apache virtual host, as explained by Apache, refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be “IP-based” or “name-based”. By default, Ubuntu already has this capability enabled, so things are much easier to configure these days. Enough with the intro, this is how you do it:

We are going to create 3 sites, site1.com, site2.com and site3.com

1. Create the folders that will host your new sites. By default, Apache in Ubuntu serves from /var/www. So create these:

  1. mkdir /var/www/site1
  2. mkdir /var/www/site2
  3. mkdir /var/www/site3

 

2. Copy the current default setting found in /etc/apache2/sites-available/default and name it the same as your new site.

  1. cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site1
  2. cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site2
  3. cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site3

 

3. Edit the new config files for each site using your preferred text editor. Add the line ServerName server1 right below the ServerAdmin line and change both DocumentRoot and Directory to point to your new sites.
This is what it should look like (you’ll do exactly the same for each of your 3 new sites, repeat this step for as many new sites as you’ll be creating):

/etc/apache2/sites-available/site1

  1. <VirtualHost *:80>
  2. ServerAdmin webmaster@localhost
  3. ServerName site1
  4. DocumentRoot /var/www/site1
  5. <Directory />
  6. Options FollowSymLinks
  7. AllowOverride All
  8. </Directory>
  9. <Directory /var/www/site1/>
  10. Options -Indexes FollowSymLinks MultiViews
  11. AllowOverride All
  12. Order allow,deny
  13. allow from all
  14. </Directory>
  15. ErrorLog ${APACHE_LOG_DIR}/error.log
  16. # Possible values include: debug, info, notice, warn, error, crit,
  17. # alert, emerg.
  18. LogLevel warn
  19. CustomLog ${APACHE_LOG_DIR}/access.log combined
  20. </VirtualHost>

 

4. After you have edited the config files for each of the 3 or how many virtual hosts you are creating, just tell Apache to start serving the new domains and stop serving the default:

  1. sudo a2ensite site1
  2. sudo a2ensite site2
  3. sudo a2ensite site3
  4. sudo a2dissite default

 

5. Now reload apache and you should be able to get to each of your new domains:

  • sudo /etc/init.d/apache2 reload

 

Sumber:

  • http://www.foscode.com/apache-virtual-host-ubuntu/
 
10 Comments

Posted in Komputer

 

Cara Monitor Secara Real-time Bandwidth Usage di Router Cisco dengan menggunakan SNMP Tool – STG

17 Jul

STG adalah singkatan dari SNMP Traffic Grapher. Software SNMP gratis buatan Leonid Mikhailov ini sangat terkenal untuk memantau secara real-time pemakaian bandwidth.Walaupun sudah lama tetapi software ini masih cukup ampuh untuk digunakan. Jika anda merasakan bahwa koneksi Internet/VPN labang lambat maka anda mungkin ingin mengecek bandwidth WAN anda secara real-time. Kebanyakan router menyediakan minimum 30 detik waktu interval dimana hal ini tidak memberikan gambaran detail pola traffic yang dapat terjadi dalam waktu 5-6 detik. Untuk mengecek secara mudah pemakaian bandwidth secara real-time maka ini adalah salah satu caranya.

Pertama-tama download filenya dari http://cisconet.com/downloads/stg.zip

Download filenya dan extract kemudian buka file “stg.exe”.
Maka anda dapat melihat gambar berikut:

Untuk mengubah setting maka pilih menu View -  Settings (F9)

Kemudian akan muncul gambar berikut, lihat bagian-bagian yang telah ditandai:

Parameter

1. Target Address

- Masukkan IP address dari Router Cisco, dapat berupa WAN(Serial)  atau LAN(Ethernet) interface.
Pada contoh ini, saya menggunakan IP address WAN(interface Serial).

2. Community

- Masukkan nama Community sebagai berikut “CiscoNet”. Anda dapat memasukkan nama apa saja, tetapi nama SNMP umum “public” tidaklah dianjurkan untuk alasan keamanan.

CiscoNet_Router#conf t
CiscoNet_Router(conf)#snmp-server community CiscoNET ro

** Beberapa perintah Cisco SNMP dapat digunakan pada berbagai platform seperti Nortel, Tasman and Adtran

3 dan 4. OID Hijau & OID Biru
- Ini adalah Object Identification untuk nilai MIB. Adalah baik untuk mengetahui detail SNMP dan MIB OID, tetapi hal ini membutuhkan banyak membaca dan pemahaman. Pada kasus ini, saya  akan memberikan anda cara yang mudah dan tips untuk mengerjakannya sesegera mungkin.
Lihat setting awal sebagai berikut:
1.3.6.1.2.1.2.2.1.10.1 – OID Hijau (inbound)
1.3.6.1.2.1.2.2.1.16.1 – OID Biru (outbound)
Penamaan Hijau & Biru hanyalah untuk membedakan traffic inbound dan outbound pada grafik
Saya tidak akan menjelaskan 1.3.6~~~ bla~ bla~. karena hal ini akan banyak sekali.
OK, cukup hal ini yang anda tahu.
10 = inbound traffic (MIB OID = ifInOctets)
16 = outbound traffic (MIB OID = ifOutOctets

Untuk memudahkan pencarian interface yang kita inginkan maka gunakan cara berikut:
1. Download Paessler “SNMPtester” and unzip it. http://www.paessler.com/download/snmptester
2. Dobel Klik snmptest.exe
3. Masukkan nilai-nilai berikut

(1) Set SNMP Settings
Local IP : Any
Device IP: x.x.x.x (Masukkan IP Address Router)
Port : 161 (Port SNMP)
SNMP version : v1 (versi snmp yang diset di router anda)
Community : CiscoNet (nama snmp-server community anda)

(2) Select Request Type

beri centang ” Scan Available Standard Interfaces”

(3) Run Test

(4) Sekarang anda dapat melihat daftar port yang sudah discan dan OID # pada sisi kanan jendela.
:
:
Found standard interfaces:
1: (001) Serial3/0,Connected,44 MBit/s,PropPointToPointSerial,
2: (002) Serial3/1,Connected,44 MBit/s,PropPointToPointSerial,
3: (003) FastEthernet1/0,Connected,100 MBit/s,Ethernet,
:
:

Testing standard interfaces…
Test 1 (1.3.6.1.2.1.2.2.1.10.1,1.3.6.1.2.1.2.2.1.16.1): in=3255521691 out=895468151
Test 2 (1.3.6.1.2.1.2.2.1.10.2,1.3.6.1.2.1.2.2.1.16.2): in=1699623616 out=901412374
Test 3 (1.3.6.1.2.1.2.2.1.10.3,1.3.6.1.2.1.2.2.1.16.3): in=1617415046 out=1038773682
:
:
Seperti yang saya telah sebutkan sebelumnya bahwa:
1.3.6.1.2.1.2.2.1.10.1 – menandakan OID Hijau (inbound traffic)
1.3.6.1.2.1.2.2.1.16.1 – menandakan OID Biru (outbound traffic)
* Pilih angka 1 (interface Serial3/0) atau 2 (interface Serial3/1)

5. Update Period (Masukkan nilai 1000 ms untuk refresh data setiap 1 detik)

Sekarang anda dapat melihat grafik MRTG seperti berikut:

6. Show traffic in

- Dalam hal ini kita sebaiknya menggunakan ukuran bits.

Sumber:

  • http://www.ipbalance.com/traffic-analysis/traffic-monitoring/247-quick-realtime-bandwidth-monitoring-by-snmp-tool-stg.html
  • http://indrapd.blogspot.com/2010/10/cara-monitor-secara-real-time-bandwidth.html
 
5 Comments

Posted in Komputer