Monitoring Jaringan dengan Ntop

apa itu ntop? liat disini atau disini

Langsung ajah!

gw pake FC 2, utk distro yg laen bisa dicari disini tinggal ketik “ntop” ajah.

# wget -bc ftp://ftp.chg.ru/.1/sourceforge/n/nt/ntop/ntop-3.2-0.fc2.i386.rpm

# wget -bc ftp://ftp.pbone.net/mirror/ftp.gwdg.de/pub/linux/misc/

funktronics/SuSE-8.2/i586-f/gdome2-0.7.4-1.i586.rpm

# rpm -ivh gdome2-0.7.4-1.i586.rpm

# rpm -ivh ntop-3.2-0.fc2.i386.rpm

# cp /etc/ntop.conf.sample /etc/ntop.conf

# vi /etc/ntop.conf <– edit konfigurasinya Read the rest of this entry »

Mempercepat Koneksi dengan Mematikan Cadangan Bandwidth dari Windows XP Pro

Secara default windows XP membatasi 20% bandwidth kita.. (kejem banged ga sich.. udah koneksi dudul beud kek gini.. masih dibatesin jg :( . hiks.. )

Berapapun cepatnya koneksi internet maupun network pada computer dengan Windows XP akan dibatasi dengan 20% untuk default koneksi network (Qos – Quality of service) dari WIndows XP. Windows sengaja membatasi koneksi bandwidth pada sistem network maupun internet, tujuannya untuk cadangan bagi paket penting.

Seberapa pentingnya dari setting default, tentu tidak semua orang memerlukan. Kecepatan network tentunya harus maksimum terlebih pada koneksi internet yang melempem di Indonesia.

Read the rest of this entry »

Manajemen Bandwidth di Squid dengan Delay Pools

Gampang-gampang susah kalo kita kepengen men-delay pool menggunakan squid (emang ada delay pool selain squid ?). Contoh delay pool disini ditujukan buat men-delay konten dari suatu situs. Untuk keterangan dan lebih jelas mengenai arti parameter pada contoh berikut silahkan merujuk pada file squid.conf atau http://www.squid-cache.org/Doc/FAQ/FAQ-23.html.

ini contoh squid.conf yang diparsing delay poolnya aja

===========================================

delay_pools 4

delay_class 1 2
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow magic_words1

delay_class 2 2
delay_parameters 2 6000/13000 500/3500
delay_access 2 allow fslambat
delay_access 2 allow magic_words3
delay_access 2 deny all

Read the rest of this entry »

Tuning up XP for better network performance

Tuning up XP for better network performance

By Roger Gann

Ever hanker for the good old days? I’m talking about the networking days of 98 – of Windows 98 in particular.

Have you ever thought that networks seemed faster back then? If so, you’re not wrong – some networking features haven’t improved since, specifically the speed of network browsing.

It’s sometimes noticeable in XP that when you click on the My Network Places icon to browse the network, nothing happens for a long time. There are a number of problems behind this and, of course, a similar number of solutions.

If you use My Network Places in the way it was intended, you could unwittingly be causing a slow down in your network performance. MNP was designed to hold shortcuts to all your favourite network shares. Unfortunately, if you have a lot of shortcuts, these generate a great deal of network traffic.

The Explorer.exe process that corresponds to this action may stop responding. Simply clearing your network share shortcuts in My Network Places may accelerate browsing. A hot-fix that cures this bug is available – but you have to ask Microsoft for it.

One solution is to stop using My Network Places and substitute Windows Explorer – right-click the Start button, select Explore and My Network Places appears in the left-hand pane. Double-click it to browse the network.

Curiously, XP keeps a copy of the contents of My Network Places in a hidden folder called NetHood. To access it, you need to create a shortcut to NetHood on the Windows desktop.

Right-click the desktop, choose New, Shortcut and type the path to the NetHood folder in the location box.

This typically takes the form of ‘C:\Documents and Settings\[username]\NetHood’. Click Next, then choose Finish to complete the shortcut. Double-clicking this shortcut accesses your network resources.

But there’s nothing to stop you accessing your network shares directly, providing you know the share name. To do this, click Start, Run, enter ‘\\computer’ and click OK. This will open a networked computer and shows all its shared resources. To be more specific, type ‘\\computer\share’. This will open a shared disk or folder on a networked computer.

Another option is to create a shortcut to Explorer.exe and pass the UNC (universal naming convention) name of the network share, such as ‘explorer /e, \\computer\share’.

Alternatively, rather than rely on UNC shares as above, you can always map a network share to a drive letter – assuming there are enough free drive letters for your shares. To map a drive, open My Computer and click Tools, Map Network Drive. Select the desired drive letter and either type in the UNC share, or browse to it and click Finish. If you click Reconnect at logon, the mapping will happen automatically every time Windows starts. The mapped drives will now be listed in My Computer.

Sometimes, when a workstation takes ages to connect to a server, it’s having trouble finding it and has to resort to broadcasting via NBT/NetBios. It can speed things up to add the name of your server and its associated TCP/IP address into your hosts file. This is located in the ‘c:\windows\system32\drivers\etc’ folder. It’s a plain text file called ‘hosts’, with no file extension. Open the hosts file using Notepad and add the line ‘10.0.0.2 server’ where ‘10.0.0.2′ is the server’s IP address and ’server’ is the hostname of the server. If you’re running DHCP, make sure the DNS is configured correctly on the workstation and the server.

Relying on NetBios names can slow things down when browsing. Instead of using a UNC share, try using the shares TCP/IP address directly. For example, instead of using ‘\\computer\network share’, try this: ‘\\192.168.0.1\share’.

And finally, it can speed things up to disable NetBios entirely – right-click My Network Places, Properties, and right-click on the Local Area Connection. Then choose Properties, select Internet Protocol (TCP/IP) and click on Properties. Click on Advanced and select the Wins tab. Choose Disable NetBios over TCP/IP. If you have a server with more than one NIC, try disabling NetBios on the other card as well.

Registry hacks
There are a number of tweaks you can make to the Registry to speed up your network browsing. Take great care when editing the Registry – always set a System Restore point before tinkering, so you can go back in time and put it back to the way it was.

If the My Network Places folder contains a shortcut to a network share, each refresh of the Explorer window will attempt to read icon information from every file across the network. This is a slow process. Simply deleting all the shortcuts from My Network Places will return the system response to normal.
Every time you open a file via a UNC name, XP adds a shortcut to the My Network Places folder. You can prevent the addition of shortcuts by setting ‘HKCU\Software\Microsoft\Windows\CurrentVersion\Po licies\Explorer\NoRecentDocsNetHood’ to 1.

It’s recommended to increase the directory buffer size on the server from 14,000 to 65,000, particularly if you have shared folders containing hundreds of files and Windows NT 4.0 is involved. To do this, add the key ‘HKLM\System\CurrentControlSet\Services\lanmanserv er\parameters’ to the Registry and add the value ‘SizReqBuf=dword:0000ffff’.

If you attempt to browse a share list on a Windows 98-based PC from a Windows 2000- or XP-based PC, there can be a delay. However it occurs only when you browse directly to the PC name. If you browse to a share name there’s no delay. The system is checking to see if scheduled tasks are enabled on the PC. You can disable this by deleting the key
‘HKLM\Software\Microsoft\Windows\CurrentVersion\Ex plorer\RemoteComputer\NameSpace\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}’.

Right-click the key and select Delete. If you have no use for viewing remote shared printers, consider deleting the printers key ‘{2227A280-3AEA-1069-A2DE-08002B30309D}’. You find this alongside the Scheduled Tasks key above. be able to

IPTABLES

IPTABLES

- Apa itu iptables?

iptables adalah suatu tools dalam sistem operasi linux yang berfungsi sebagai alat untuk melakukan filter (penyaringan) terhadap (trafic) lalulintas data. Secara sederhana digambarkan sebagai pengatur lalulintas data. Dengan iptables inilah kita akan mengatur semua lalulintas dalam komputer kita, baik yang masuk ke komputer, keluar dari komputer, ataupun traffic yang sekedar melewati komputer kita.

- Gimana perintahnya?

iptables [–t tables] [option] [rule] [target]

Contohnya:

iptables –P FORWARD ACCEPT

- Apa saja yang bisa dilakukan dengan iptables?

Dengan kemampuan tools iptables ini, kita bisa melakukan banyak hal dengan iptables. Yang paling penting adalah bahwa dengan iptables ini kita bisa membuat aturan (rule), untuk arus lalulintas data. Aturan aturan itu dapat mencakup banyak hal, seperti besar data yang boleh lewat, jenis paket/datagram yang dapat diterima, mengatur trafic berdasar asal dan tujuan data, forwarding, nat, redirecting, pengelolaan port, dan firewall.

- Bagaimana gambaran lalulintas dalam sistem jaringan.

Lalu lintas dalam sistem jaringan digambarkan sebagai berikut

http://geocities.com/bimosaurus/bim.jpg

Gambar 1. Lalu lintas data dalam sistem

Keterangan:
1. Data masuk ke dalam sistem komputer bisa melalui banyak jalan, biasanya melalui network interface. Bisa berupa card dan dapat pula berupa wifi lan atau yang lain. Setelah masuk sistem, maka data tersebut akan segera masuk ke dalam decission maker, yang menentukan bahwa data itu akan di proses ke dalam komputer (input) atau akan di lewatkan (forward).
2. Setelah data masuk jika data tersebut mendapatkan rantai FORWARD maka akan segera masuk dalam aturan dalam rule FORWARD tersebut.
3. Jika data masuk ke dalam rantai input, maka data akan mengalami rule

Perlakuan apa saja yang dialami data oleh iptables?

Perlakuan yang dialami oleh data/paket data oleh iptables digambarkan melalui tabel. Macam tabelnya adalah:
1. Filter : tabel default yang ada dalam penggunaan iptables
2. NAT : tabel ini digunakan untuk fungsi NAT, redirect, redirect port
3. Mangle : tabel ini berfungsi sebagai penghalus proses pengaturan paket

Bagaimana kita bisa peroleh informasi tentang iptables tersebut di dalam sistem operasi linux?

Kita bisa peroleh info tentang iptables, dengan cara mengetikkan:

man iptables
atau
iptables –help

Perintah man adalah untuk mendapatkan manual penggunaaan dari iptables ini. Sedangkan help adalah untuk mendapatkan informasi help dari iptables tersebut.

- OPTION
Option terdiri dari command, dan parameter serta opsi tambahan

COMMAND
Command dan rule yang dipasang pada iptables (firewall) memiliki ketentuan. Pada dasarnya iptables pada komputer dianggap sebagai TABEL IP sesuai dengan namanya. System hanya akan menjalan rule yang ada pada tabel. Sedangkan rule yang sudah ada pada iptables juga dapat di hapus atau di replace dengan rule lain. Berikut beberapa command untuk penambahan, penghapusan dan operasi sejenisnya yang akan diperlakukan terhadap rule.

Daftar  Perintah berikut keterangan

-A atau –append Melakukan penambahan rule
-D atau –delete Melakukan penghapusan rule
-R atau –replace Melakukan replacing rule
-L atau –list Menampilkan ke display, daftar iptables
-F atau –flush Menghapus daftar iptables/pengosongan
-I atau –insert Melakukan penyisipan rule
-N atau –new-chain Melakukan penambahan chain baru
-X atau –delete-chain Melakukan penghapusan chain
-P atau –policy Memberikan rule standard
-E atau –rename Memberikan penggantian nama
-h atau –help Menampilkan fasilitas help

Table 1. Table Command iptables

 

 

Parameter
Parameter iptables digunakan sebagai pelengkap yang diperlukan untuk tujuan spesifikasi rule tersebut

Parameter berikut Keterangan
-p, –protocol (proto) Parameter ini untuk menentukan perlakuan terhadap protokol
-s, –source (address) –-src Parameter untuk menentukan asal paket
-d, –destination (address) –-dst Parameter untuk menentukan tujuan paket
-j, –jump (target)
-g, –goto (chain)
-i, –in-interface Masuk melalui interface (eth0, eth1 dst)
-o, –out-interface
[!] -f, –fragment
-c, –set-counters

Table 2. Tabel Parameter iptables

 

 

 

Parameter berikut Keterangan
–sport
–source-port Menentukan port asal
–dport
–destination-port Menentukan port tujuan
–tcp-flags Menentukan perlakuan datagram
–syn
Table 3. Tabel Parameter detail

Selanjutnya apa itu yang disebut dengan chain?
Chain/rantai digambarkan sebagai jalur aliran data. Chains yang diperlukan untuk iptables ini antara lain:

Chain berikut Keterangan
FORWARD Route packet akan di FORWARD tanpa di proses lanjut di local
INPUT Route packet masuk ke dalam proses lokal sistem
OUTPUT Route packet keluar dari local sistem
PREROUTING Chain yang digunakan untuk keperluan perlakuan sebelum packet masuk route. Biasanya dipakai untuk proses NAT
POSTROUTING Chain yang digunakan untuk keperluan perlakuan sesudah packet masuk route. Biasanya dipakai untuk proses NAT

Tabel 4. Tabel Chain

 

 

 

 

Chain PREROUTING dan POSTROUTING dimaksudkan sebagai jalur data sebelum dan sesudah data tersebut masuk ke dalam route.
PREROUTING: data sebelum masuk jalur route, akan di kenakan rule
POSTROUTING: data sebelum masuk akan dikenakan route

Apakah target itu?
Target adalah tujuan perlakuan terhadap rule. Pada target ini terletak keputusan, paket data mau diapakan, apakah mau di tolak, atau diteruskan atau diolah terlebih dahulu. Berikut daftar table target iptables

Target berikut Keterangan
ACCEPT Rantai paket tersebut diterima dalam rule
DROP Rantai paket tersebut “dijatuhkan”
REJECT Rantai paket tersebut ditolak seperti DROP
DNAT Rantai paket di “destination nat” kan ke address lain
SNAT Rantai paket di arahkan ke source nat tertentu
REDIRECT Rantai paket di redirect ke suatu addres dan port tertentu
MASQUERADE Bekerja seperti SNAT tapi tidak memerlukan source
REJECT Bekerja seperti DROP

Contoh beberapa kasus untuk iptables

Misalkan terdapat sebuah jaringan komputer menggunakan koneksi internet dengan IP ADDRESS publik
222.124.132.91 (eth0)
Server gateway memiliki 3 anak jaringan (jaringan lokal) dengan dibedakan subnet

192.168.0.0/24 (eth1)
192.168.1.0/24 (eth2)
192.168.10.0/24 (eth3)

Kondisi dalam jaringan, eth3 tidak diperbolehkan melakukan akses ke internet tetapi diperbolehkan masuk ke jaringan lokal lainnya melalui protokol http. Sedangkan eth1 dan eth2 diperbolehkan melakukan akses ke internet. Pada IP ADDRESS 192.168.1.10 terdapat webserver, dan pada IP Address 192.168.1.12 terdapat koleksi intranet yang akan dipublish ke internet. Disamping itu, koneksi internet 1 mega tersebut akan di share, untuk semua komputer di eth2 akan dibatasi pemakaiannya maksimal 10kbps. Berikut contoh sederhana routin firewallnya

#/bin/bash

#blok semua address (default), pada dasarnya semua akses di blok
iptables –P INPUT –j DROP
#bersihkan table
iptables –F
iptables –t nat –F
iptables –t mangle -F
#perkecualian dengan syarat tertentu
iptables -A INPUT -d 192.168.1.0/24 -m limit –limit 10/s –limit-burst 20 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -m limit –limit 10/s –limit-burst 20 -j ACCEPT
iptables –t nat –A POSTROUTING –s 192.168.0.0/24 –j MASQUERADE
iptables –t nat –A POSTROUTING –s 192.168.1.0/24 –j MASQUERADE
#forward webserver dan intranet
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j DNAT –to 192.168.0.10:80
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 88 -j DNAT –to 192.168.0.12:80
#redirect ke squid
iptables –t nat –A PREROUTING –s 192.168.10.0/24 -p tcp –dport 80 -j REDIRECT –to-port 3128
iptables –t nat –A PREROUTING –s 192.168.10.1/24 -p tcp –dport 80 -j REDIRECT –to-port 3128
=========================================================================================

Semoga bermanfaat

taken from http://bodhon.wordpress.com/2007/04/10/iptables/