Tentang IT dan Komputer

Teknologi Informasi

Archive for the ‘Linux’ Category

Install Squid Analizer Report Generator (Sarg) Di debian

Posted by intrik on May 16, 2008

Sarg merupak salah satu web based analizer yang menampilkan access.log ke server squid. Sarg bisa dipakai untu memonitor access client ke internet.Untuk selengkapanya kita langsng saja ke materi pelajaran 😀

Langkah yang pertama download sarg di alamat:
# http://sarg.sourceforge.net/sarg.php
atau langsung dari mesin linux dengan cara :
# wget http://optusnet.dl.sourceforge.net/sourceforge/sarg/sarg-2.2.3.1.tar.gz

Langkah yang kedua adalah mengekstrak paket sarg :
# tar -xzvf sarg-2.2.3.1.tar.gz

Langkah ketiga masuk kedalam direktori dari sarg
# cd sarg-2.2.3.1

Langkah keempat jalankanlah perintah configur
# ./configure –enable-bindir=/usr/bin –enable-sysconfdir=/etc/sarg –enable-htmldir=/var/www –enable-mandir=/usr/local/man/man1

Langkah kelima berikan perintah
# make
# make install

Langkah keenam edit file /etc/sarg/sarg.conf
sebagai contoh configurasi yang saya gunakan :
language English
access_log /var/log/squid/acces.log
graphs yes
graph_days_bytes_bar_color orange
title “Squid User Access Reports”
output_dir /var/www/sarg-php
resolve_ip no
topuser_sort_field BYTES reverse
user_sort_field BYTES reverse
lastlog 3
remove_temp_files yes
index yes
index_tree file
overwrite_report yes
topsites_num 200
topsites_sort_order CONNECT D
index_sort_order D
report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
show_successful_message yes
show_read_statistics yes
topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
topuser_num 0

Langkah ke tujuh jalankan perintah :
# /usr/bin/sarg -l /var/log/squid/access.log

Dan langkah yang terakhir anda bisa mengarahkan browser anda pada http://ip_server/sarg-php. Dengan catatan/asumsi SBB:
1. Support Apache
2. Support php

Selamat mencoba !!!!!

sumber :http://ideasone.blogspot.com/2008/02/install-sarg-squid-analizer-report.html

Posted in Linux | Leave a Comment »

Cara mudah memanage Bandwidth di Fedora Core 6 Dengan HTB-GEN

Posted by intrik on May 16, 2008

Implementasi bandwidth management biasanya di terapkan pada main-gw (gateway utama) dimana main-gw menghandle beberapa klien yang mempunyai jatah bandwidth yang telah di tetapkan. Disini kita akan menggunakan tool bantu yang bernama HTB-GEN.
Pada distro linux kebanyakan sebenarnya htb/cbq sudah include di kernel default masing-masing distro, tinggal kita saja yang kurang familiar dengan perintah tc yang digunakan sebagai standar tool shaping bandwith. Untuk itulah kita menggunakan HTB-GEN disini.
Yang perlu diingat adalah :
Lisensi GPLv2 or later
Syarat dan kebutuhan untuk menjalankannya:
-bash
-QoS htb kernel support
-iproute2 tc
-iptables
-htb-init script (optional)

Ok kita mulai aja meng-implementasikan HTB-GEN ke mesin main-gw kita, langkah-langkahnya adalah sebagai berikut:
Langkah 1: Download

– htb-gen-0.8.4.tar.gz Source tarball
– htb-gen_0.8.4_all.deb Debian package
– htb-gen-0.8.4–1.noarch.rpm Aliened RPM package

Archive at http://www.praga.org.ar/dev/htb-gen/packages/

sesuaikan dengan distro based yang dipakai, disini saya pake Fedora Core 6, otomatis harus download yang versi .rpm

Langkah 2: Install
untuk menginstall htb-gen di mandriva, tinggal menjalankan perintah
#urpmi htb-gen-0.8.4-1.noarch.rpm

Langkah 3: Konfigurasi
setelah langkah instalasi dilalui dengan sukses 🙂 maka akan terdapat file konfigurasi standar htb-gen di direktori /etc/htb-gen.
Edit file /etc/htb-gen/htb-gen.conf, dengan editor kesayangan anda 🙂

#vim /etc/htb-gen/htb-gen.conf

perhatikan baris berikut ini:

iface_down=”eth1″ # Server LAN iface
iface_up=”eth0″ # Server INET iface
total_rate_down=1024 #Total download bw
total_rate_up=512 #Total upload bw

Kemudian di file /etc/htb-gen/htb-gen-rates.conf, perhatikan baris berikut :

# down down up up
# min max min max
#ip (rate) (ceil) (rate) (ceil)
192.168.1.2 0 64 0 32
192.168.1.3 0 128 0 64
192.168.1.4 0 256 0 128
10.0.0.1/30 256 512 128 256
200.80.22.2 256 256 256 256

Seperti yang terlihat

mudah sekali untuk membatasi suatu host atau network

ip beda network juga bisa digunakan

penulisan format ip dan network mengikuti aturan standar

mendukung fixed rate b/w

nilai nol atau “0″ artinya secara otomatis akan menggunakan b/w yang ada atau b/w yang tersisa.

Selanjutnya….

Langkah 4: Menjalakannya

Untuk menjalankan htb-gen sangat mudah, secara umum htb-gen dapat di jalankan dengan opsi sebagai berikut

#htb-gen tc_all

lebih lanjut dengan opsi htb-gen, bisa di cek dengan perintah

#htb-gen –help

Sesuaikan dengan ip yang ada di jaringan anda………. selamat mencoba!!!!

sumber: http://ideasone.blogspot.com/2008/02/htb-gen-cara-mudah-memanage-bandwidth.html

Posted in Linux | Leave a Comment »

install proxy squid di redhat 9 dan transparansi proxy

Posted by intrik on January 25, 2008

Bingung tentang sequid dan transparansi proxy disini solusinya. Mula-mula aku juga bingun mengerti tentang squid dan transparansi proxy ini tapi berkat pertolongan om google kami bisa temukan artikel yang sangat menguntungkan buat saya dan memecah kepeningan pikiran saya tentang squid dan transparansi proxy ini.
Nggak usah lama-lama ceritanya langsung aja ke tahap demi tahap…. kita mulai ok………….

1. download squid nya dulu
#wget http://swelltech.com/support/updates/squid/9/i386/squid-2.5.STABLE3-1rh.i386.rpm

2. habis di download, install dech di server lo
#rpm -ivh squid-2.5.STABLE3-1rh.i386.rpm

3. pindahkan file squid yang asli
#mv /etc/squid/squid.conf /etc/squid/squid.conf.original

4. buat konfigurasi squid yang baru.
#vi /etc/squid/squid.conf

— copy tulisan dibawah ini —

http_port 3128
icp_port 3130
cache_mem 64 MB
connect_timeout 2 minutes
maximum_object_size 20480 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 4096 KB
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir diskd /gambar 10000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
log_ip_on_direct on
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 6667 7000
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777 110
acl Safe_ports port 5050
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
icp_access allow all
cache_mgr namalo # masukin nama lo disini
visible_hostname domainlo.com # terserah, domain asal aja, cuma formalitas doang
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

— berakhir diatas tulisan ini —
simpen make esc :wq (tekan enter)

ket: kali ini gue gak make konsep delay pools, males….!!!

5. buat folder gambar di / caranya:
#cd /
#mkdir gambar

6. ubah kepemilikan gambar jadi group
#chown -R squid.squid /gambar

7. jalankan squid
#/etc/init.d/squid start

8. agar squid dijalankan otomatis saat reboot komputer:
#setup
cari “system services” (tanpa tanda kutip), run tool, kemudian cari squid dan ceklis/aktifkan

9. masukin juga transparant proxynya, agar user gak perlu masukin proxy di program webnya
#/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp –dport 80 -j REDIRECT –to-ports 3128
#/sbin/iptables -t nat -A PREROUTING -i eth1 -p udp –dport 80 -j REDIRECT –to-ports 3128

10. agar transparant proxy dijalankan saat server dinyalain masukin juga di rc.local iptables diatas yang sebelumnya set dulu iptables untuk natnya agar client bisa menggunakan jalur internetnya.
#vi /etc/rc.local

simpen dengan menekan esc :wq (kemudian enter)

Terma kasih kami ucapkan untuk mas pinokio
sumber : http://pinokiook.blogspot.com/2007/12/install-proxy-dengan-squid-25stable3-di.html

Posted in Linux | Leave a Comment »

How To Download And Install VSFTPD

Posted by intrik on October 25, 2007

Most Linux software products are available in a precompiled package format. Downloading and installing packages isn’t hard. If you need a refresher, Chapter 6, “Installing Linux Software“, covers how to do this in detail. It is best to use the latest version of VSFTPD.

When searching for the file, remember that the VSFTPD packages’ filename usually starts with the word vsftpd followed by a version number, as in vsftpd-1.2.1-5.i386.rpm for Redhat/Fedora or vsftpd_2.0.4-0ubuntu4_i386.deb for Ubuntu.

How To Get VSFTPD Started

With Fedora, Redhat, Ubunbtu and Debian You can start, stop, or restart VSFTPD after booting by using these commands:

[root@bigboy tmp]# /etc/init.d/vsftpd start
[root@bigboy tmp]# /etc/init.d/vsftpd stop
[root@bigboy tmp]# /etc/init.d/vsftpd restart

With Redhat / Fedora you can configure VSFTPD to start at boot you can use the chkconfig command.

[root@bigboy tmp]# chkconfig vsftpd on

With Ubuntu / Debian the sysv-rc-conf command can be used like this:

root@u-bigboy:/tmp# sysv-rc-conf on

Note: In RedHat Linux version 8.0 and earlier, VSFTPD operation is controlled by the xinetd process, which is covered in Chapter 16, “Telnet, TFTP, and xinetd“. You can find a full description of how to configure these versions of Linux for VSFTPD in Appendix III, “Fedora Version Differences.”

Testing the Status of VSFTPD

You can always test whether the VSFTPD process is running by using the netstat -a command which lists all the TCP and UDP ports on which the server is listening for traffic. This example shows the expected output.

[root@bigboy root]# netstat -a | grep ftp
tcp        0        0        *:ftp         *:*        LISTEN
[root@bigboy root]#

If VSFTPD wasn’t running, there would be no output at all.

The vsftpd.conf File

VSFTPD only reads the contents of its vsftpd.conf configuration file only when it starts, so you’ll have to restart VSFTPD each time you edit the file in order for the changes to take effect. The file may be located in either the /etc or the /etc/vsftpd directories depending on your Linux distribution.

This file uses a number of default settings you need to know about.

  • VSFTPD runs as an anonymous FTP server. Unless you want any remote user to log into to your default FTP directory using a username of anonymous and a password that’s the same as their email address, I would suggest turning this off. The configuration file’s anonymous_enable directive can be set to no to disable this feature. You’ll also need to simultaneously enable local users to be able to log in by removing the comment symbol (#) before the local_enable instruction.
  • If you enable anonymous FTP with VSFTPD, remember to define the root directory that visitors will visit. This is done with the anon_root directive.
anon_root=/data/directory
  • VSFTPD allows only anonymous FTP downloads to remote users, not uploads from them. This can be changed by modifying the anon_upload_enable directive shown later.
  • VSFTPD doesn’t allow anonymous users to create directories on your FTP server. You can change this by modifying the anon_mkdir_write_enable directive.
  • VSFTPD logs FTP access to the /var/log/vsftpd.log log file. You can change this by modifying the xferlog_file directive.
  • By default VSFTPD expects files for anonymous FTP to be placed in the /var/ftp directory. You can change this by modifying the anon_root directive. There is always the risk with anonymous FTP that users will discover a way to write files to your anonymous FTP directory. You run the risk of filling up your /var partition if you use the default setting. It is best to make the anonymous FTP directory reside in its own dedicated partition.

The configuration file is fairly straight forward as you can see in the snippet below where we enable anonymous FTP and individual accounts simultaneously.

# Allow anonymous FTP?
anonymous_enable=YES
...
# The directory which vsftpd will try to change
# into after an anonymous login. (Default = /var/ftp)
anon_root=/data/directory
...
# Uncomment this to allow local users to log in.
local_enable=YES
...
# Uncomment this to enable any form of FTP write command.
# (Needed even if you want local users to be able to upload files)
write_enable=YES
...
# Uncomment to allow the anonymous FTP user to upload files. This only
# has an effect if global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
...
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
...
# Activate logging of uploads/downloads.
xferlog_enable=YES
...
# You may override where the log file goes if you like.
# The default is shown below.
xferlog_file=/var/log/vsftpd.log
...

To activate or deactivate a feature, remove or add the # at the beginning of the appropriate line.

Other vsftpd.conf Options

There are many other options you can add to this file:

  • Limiting the maximum number of client connections (max_clients)
  • Limiting the number of connections by source IP address (max_per_ip)
  • The maximum rate of data transfer per anonymous login. (anon_max_rate)
  • The maximum rate of data transfer per non-anonymous login. (local_max_rate)

Descriptions on this and more can be found in the vsftpd.conf man pages.

FTP Security Issues

FTP has a number of security drawbacks, but you can overcome them in some cases. You can restrict an individual Linux user’s access to non-anonymous FTP, and you can change the configuration to not display the FTP server’s software version information, but unfortunately, though very convenient, FTP logins and data transfers are not encrypted.

The /etc/vsftpd.ftpusers File

For added security, you may restrict FTP access to certain users by adding them to the list of users in the /etc/vsftpd.ftpusers file. The VSFTPD package creates this file with a number of entries for privileged users that normally shouldn’t have FTP access. As FTP doesn’t encrypt passwords, thereby increasing the risk of data or passwords being compromised, it is a good idea to let these entries remain and add new entries for additional security.

Anonymous Upload

If you want remote users to write data to your FTP server, then you should create a write-only directory within /var/ftp/pub. This will allow your users to upload but not access other files uploaded by other users. The commands you need are:

[root@bigboy tmp]# mkdir /var/ftp/pub/upload
[root@bigboy tmp]# chmod 722 /var/ftp/pub/upload

FTP Greeting Banner

Change the default greeting banner in the vsftpd.conf file to make it harder for malicious users to determine the type of system you have. The directive in this file is.

ftpd_banner= New Banner Here

Using SCP As Secure Alternative To FTP

One of the disadvantages of FTP is that it does not encrypt your username and password. This could make your user account vulnerable to an unauthorized attack from a person eavesdropping on the network connection. Secure Copy (SCP) and Secure FTP (SFTP) provide encryption and could be considered as an alternative to FTP for trusted users. SCP does not support anonymous services, however, a feature that FTP does support.

Troubleshooting FTP

You should always test your FTP installation by attempting to use an FTP client to log in to your FTP server to transfer sample files.

The most common sources of day-to-day failures are incorrect usernames and passwords.

Initial setup failures could be caused by firewalls along the path between the client and server blocking some or all types of FTP traffic. Typical symptoms of this are either connection timeouts or the ability to use the ls command to view the contents of a directory without the ability to either upload or download files. Follow the firewall rule guidelines to help overcome this problem. Connection problems could also be the result of typical network issues outlined in Chapter 4, “Simple Network Troubleshooting“.

Tutorial

FTP has many uses, one of which is allowing numerous unknown users to download files. You have to be careful, because you run the risk of accidentally allowing unknown persons to upload files to your server. This sort of unintended activity can quickly fill up your hard drive with illegal software, images, and music for the world to download, which in turn can clog your server’s Internet access and drive up your bandwidth charges.

FTP Users with Only Read Access to a Shared Directory

In this example, anonymous FTP is not desired, but a group of trusted users need to have read only access to a directory for downloading files. Here are the steps:

1) Disable anonymous FTP. Comment out the anonymous_enable line in the vsftpd.conf file like this:

# Allow anonymous FTP?
anonymous_enable=NO

2) Enable individual logins by making sure you have the local_enable line uncommented in the vsftpd.conf file like this:

# Uncomment this to allow local users to log in.
local_enable=YES

3) Start VSFTP.

[root@bigboy tmp]# service vsftpd start

4) Create a user group and shared directory. In this case, use /home/ftp-users and a user group name of ftp-users for the remote users

[root@bigboy tmp]# groupadd ftp-users
[root@bigboy tmp]# mkdir /home/ftp-docs

5) Make the directory accessible to the ftp-users group.

[root@bigboy tmp]# chmod 750 /home/ftp-docs
[root@bigboy tmp]# chown root:ftp-users /home/ftp-docs

6) Add users, and make their default directory /home/ftp-docs

[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user1
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user2
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user3
[root@bigboy tmp]# useradd -g ftp-users -d /home/ftp-docs user4
[root@bigboy tmp]# passwd user1
[root@bigboy tmp]# passwd user2
[root@bigboy tmp]# passwd user3
[root@bigboy tmp]# passwd user4

7) Copy files to be downloaded by your users into the /home/ftp-docs directory

8) Change the permissions of the files in the /home/ftp-docs directory for read only access by the group

[root@bigboy tmp]# chown root:ftp-users /home/ftp-docs/*
[root@bigboy tmp]# chmod 740 /home/ftp-docs/*
Users should now be able to log in via FTP to the server using their new usernames and passwords. If you absolutely don’t want any FTP users to be able to write to any directory, then you should set the write_enable line in your vsftpd.conf file to no:
write_enable = NO

Remember, you must restart VSFTPD for the configuration file changes to take effect.

Sample Login Session To Test Functionality

Here is a simple test procedure you can use to make sure everything is working correctly:

1) Check for the presence of a test file on the ftp client server.

[root@smallfry tmp]# ll
total 1
-rw-r--r-- 1 root root 0 Jan 4 09:08 testfile
[root@smallfry tmp]#

2) Connect to bigboy via FTP

[root@smallfry tmp]# ftp 192.168.1.100
Connected to 192.168.1.100 (192.168.1.100)
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (192.168.1.100:root): user1
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
As expected, we can’t do an upload transfer of testfile to bigboy.
ftp> put testfile
local: testfile remote: testfile
227 Entering Passive Mode (192,168,1,100,181,210)
553 Could not create file.
ftp>
But we can view and download a copy of the VSFTPD RPM located on the FTP server bigboy.
ftp> ls
227 Entering Passive Mode (192,168,1,100,35,173)
150 Here comes the directory listing.
-rwxr----- 1 0 502 76288 Jan 04 17:06 vsftpd-1.1.0-1.i386.rpm
226 Directory send OK.
ftp> get vsftpd-1.1.0-1.i386.rpm vsftpd-1.1.0-1.i386.rpm.tmp
local: vsftpd-1.1.0-1.i386.rpm.tmp remote: vsftpd-1.1.0-1.i386.rpm
227 Entering Passive Mode (192,168,1,100,44,156)
150 Opening BINARY mode data connection for vsftpd-1.1.0-1.i386.rpm (76288 bytes).
226 File send OK.
76288 bytes received in 0.499 secs (1.5e+02 Kbytes/sec)
ftp> exit
221 Goodbye.
[root@smallfry tmp]#
As expected, anonymous FTP fails.
[root@smallfry tmp]# ftp 192.168.1.100
Connected to 192.168.1.100 (192.168.1.100)
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (192.168.1.100:root): anonymous
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> quit
221 Goodbye.
[root@smallfry tmp]#

Now that testing is complete, you can make this a regular part of your FTP server’s operation.

sumber : http://www.linuxhomenetworking.com/

Posted in Linux | Leave a Comment »

Setting up Dial-up connection in Ubuntu

Posted by intrik on August 16, 2007

Dial-up access is a form of Internet access through which the client uses a modem connected to a computer and a telephone line to dial into an Internet service provider’s (ISP) node to establish a modem-to-modem link, which is then routed to the Internet.Most ISPs provide dial-up connections supporting PPP because it is a fast and efficient protocol for using TCP/IP over serial lines. PPP is designed for two-way networking; TCP/IP provides the transport protocol for data.

PPP (Point to Point Protocol) uses several components on your system. The first is a daemon called pppd, which controls the use of PPP. The second is a driver called the high-level data link control (HDLC), which controls the flow of information between two machines. A third component of PPP is a routine called chat that dials the other end of the connection for you when you want it to.

Configuring a Dial-Up Connection in Ubuntu

Ubuntu includes some useful utilities to get your dial-up connection up and running.Here is the following ways you can connect to your dialup connection

1)Using your networking option in Ubuntu

2)using gnome-ppp

3)using kppp (For Kubuntu)

4)using wvdialconf & wvdial

5)using pppconfig & pon/poff

first thing you need to make sure your modem drivers are installed or not.If you want more details about modem drivers in ubuntu and installation check here

Now we will see 3 ways how to configure dialup connection in ubuntu

Before Starting

Before configuring Dial-up connection you need to have the following information from your ISP

1)Username

2)Password

3)Dail-in number

Configuring a Dial-Up Connection using Networking option

you can go to System—>Administration —>Networking


Once it open the application you should see the following screen

In the above screen select modem connection option and click on properties you should see the following screen

The first thing you will need to do is to enable the connection by ticking the Enable this connection box,now you need enter your ISP’s phone number as well as your username and password

Next, click on the modem tab to specify details about your modem and also configure the speaker volume. Most telephone systems use tone dialling nowadays, so make sure this is selected . I have selected the speaker volume on medium.

Now you need to click on options tab If you are using a laptop, then you will probably want to uncheck Set modem as default route to the Internet whilst you are on a LAN, otherwise you may struggle to see anything! Tick it when you are expecting to use your dial-up connection though, and Ubuntu will use this connection to get out onto the Internet.You need to select other two options checked.

Now You can use the Gnome Modem Monitor and Network Monitor panel if you want to stop, start and monitor modem connections.

Configuring a Dial-Up Connection using pppconfig

configure a connection using pppconfig, a command line utility to help you to configure specific dial-up connection settings.This is a command line based option to manage dialup connections.

Open a terminal from Applications > System Tools > Terminal and type

sudo pppconfig

Now you should see the following screen here you need to select “Create Create a connection” select ok and press enter

Here you need to enter provider name and you can leave default one and in this example i am giving “comcast” select ok and press enter

Next screen you need to select “Dynamic Use dynamic DNS” select ok and press enter

You need to select Authentication method here i am selecting “chat :Use chat for login/password :Authentication” select ok and press enter

Select login prompt option leave default select ok and press enter

Select password prompt option leave default select ok and press enter

Enter the username given to you by your ISP in this example i am using “ruchiw” select ok and press enter

Enter the password given to you by your ISP in this example i am using “myfirstpassword” select ok and press enter

Enter the modem speed as “115200″ select ok and press enter

Select method of dialing as “Tone” select ok and press enter

Enter the number to dial select ok and press enter

Choose your modem configuration method if you want to detect your modem automatically select yes otherwise select no in this example i am selecting no select ok and press enter

Select the modem port and i leave the default option select ok and press enter

Here is the complete details you have choosen for your provider connection in this example comcast

Finished the connection settings select ok and press enter

Select “Quit Exit this utility”

Exit the terminal window using the following command

exit

Connecting to your ISP

Before you connect for the first time you need to add yourself to both the dip and dialout groups by using the commands

sudo adduser YOURNAMEHERE dip

sudo adduser YOURNAMEHERE dialout

# connect to the ISP configured as “comcast”

pon comcast

# disconnect the ISP configured as “comcast”

poff comcast

If you are trying to connect as default “provider” you need to use the following commands to connect and disconnect

pon

poff

You can check the last messages generated by these commands with

# shows the (status) messages generated by pon and poff

plog

Configuring a Dial-Up Connection using gnome-ppp

GNOME PPP is an easy to use graphical dialup connection configuring and dialing tool with system tray icon support.It uses GNOME/GTK+ for its graphical interface and integrates well in GNOME desktop environment, but it can be used in other environments.

It also uses WvDial dialer as its backend, providing simple configuration via config files. You can also use plain wvdial if you don’t have X running.

Install gnome-ppp Ubuntu

sudo apt-get install gnome-ppp

This will complete the installation.

If you want to open the application go to Application—>Internet—>GNOME PPP

Once application opens you should see the following screen

In the above screen you need to click on setup to configure your settings you should see the following screen configre the modem settings

Next click on networking tab to configure network settings

Next click on options tab to configure general options

Once you have all the details enter the details you can see the following screen

sumber : http://www.ubuntugeek.com/

Posted in Linux | Leave a Comment »

SHARING INTERNET DIAL UP DENGAN LINUX

Posted by intrik on August 16, 2007

Komputer anda telah terinstall OS Mandriva 2005 , semua aplikasi sudah terintegrasi ( included ) pada cd Mandriva 2005 jadi anda hanya tinggal install seperti biasa menggunakan rpm maupun urpmi.

Konfigurasi wvdial

masuk sebagai root

[userdrake@migration-team ~]$ su –
[root@migration-team ~]#

jalankan wvdialconf

[root@migration-team ~]# wvdialconf /etc/wvdial.conf
Scanning your serial ports for a modem.

ttyS1<*1>: ATQ0 V1 E1 — OK
ttyS1<*1>: ATQ0 V1 E1 Z — OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 — OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 — OK
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0 — OK
ttyS1<*1>: Modem Identifier: ATI — 28800
ttyS1<*1>: Speed 2400: AT — OK
ttyS1<*1>: Speed 4800: AT — OK
ttyS1<*1>: Speed 9600: AT — OK
ttyS1<*1>: Speed 19200: AT — OK
ttyS1<*1>: Speed 38400: AT — OK
ttyS1<*1>: Speed 57600: AT — OK
ttyS1<*1>: Speed 115200: AT — OK
ttyS1<*1>: Max speed is 115200; that should be safe.
ttyS1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0 — OK
ttyS0<*1>: ATQ0 V1 E1 — ATQ0 V1 E1 — ATQ0 V1 E1 — nothing.
Port Scan<*1>: S2 S3

Found a modem on /dev/ttyS1.

 

Lakukan konfigurasi wvdial.conf

[Dialer Defaults]
Modem = /dev/ttyS1
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
Phone = 080989999
Username = telkomnet@instan

Password = telkom

jalankan wvdial

[userdrake@migration-team ~]# wvdial

setelah komputer terkoneksi biasanya komputer nya akan mendapatkan DNS di /etc/resolve.conf dan routing gateway telkom itu artinya komputer anda sudah bisa browsing,

Untuk menshare ada beberpa tahapan konfigurasi lagi.

Aktifkan forward ipv4

[userdrake@migration-team ~]# vi /etc/sysctl.conf

ipv4_forward = 1 ( aktif , default=0 )

agar network local dapat melakukan routing ke ppp0 ( disini kunci agar jaringan komputer kita dapat sharing internet

[userdrake@migration-team ~]# iptables -t nat -A POSTROUTING -s 10.60.254.0/24 -o ppp0 -j MASQUERADE

Posted in Linux | Leave a Comment »

Instalasi dan Konfigurasi LTSP 4.1.1 Dengan Fedora Core 4

Posted by intrik on August 15, 2007

Proof-of-concept instalasi dan konfigurasi LTSP (Linux Terminal Server Project)
4.1.1 dengan Fedora Core 4 sebagai basis sistem operasinya. Selain dari instalasi dan
konfigurasi LTSP di sistem operasi Fedora, dokumen ini juga membahas Symbiont
Workstation Manager (SWM) 4.1.4, DireqCafe 3.0 dan CD PXES (Universal Linux Thin
Client) 1.0 secara satu kesatuan.
Juga dibahas tentang WINE (Wine Is Not Emulator) untuk mereka yang tertarik
untuk menjalankan aplikasi Windows di lingkungan Linux/LTSP. Dengan menggunakan
WINE maka tidak diperlukan lagi sistem operasi Windows untuk menjalankan aplikasi
Windows.
Gabungan dari empat perangkat lunak dan sistem operasi tersebut menghasilkan
solusi lingkungan terminal terminal server yang bisa dihandalkan, mudah untuk
diimplementasikan dan mudah pemeliharaannya. Bila instalasi dan konfigurasi awal
sudah berjalan dengan baik maka untuk memelihara lingkungan LTSP ini tidak
memerlukan orang yang ahli Linux. Dengan menggunakan web GUI (Graphical User
Interface) maka tingkat pemula-pun akan mampu mengoperasikannya dengan baik.
Perangkat keras yang dipakai untuk klien LTSP sangat dianjurkan pakai kartu
jaringan yang mendukung PXE (Preboot eXecution Environment) tetapi kalau tidak
punya maka lihat solusi yang diberikan di lampiran A (Boot Klien LTSP dari CD PXES
(Universal Linux Thin Client)). Saat ini tidak dicantumkan solusi untuk boot klien LTSP
dari floppy ataupun harddisk.

Untuk lebih lengkapnya silahkan download di sini

Posted in Linux | Leave a Comment »

instalasi CBQ dan HTB

Posted by intrik on May 3, 2007

INSTALASI HTB (Hierachical Token Bucket)
Dan CBQ (Class-Based Queueing)
Hanny Wijaya (hanny@rsds.or.id) , irc.efnet.net #indolinux

12-Nov-2003
________________________________________
Alangkah baiknya siapkan satu pak rokok (A mild) dan makanan ringan :). Distro yang digunakan adalah Redhat Linux 7.2. dan 7.3 .Tidak ada copyright apapun dalam dukumen ini, anda bebas menyalin, mencetak, maupun memodifikasi (dengan menyertakan nama penulis asli). Semoga bermanfaat dan memajukan opensource software di Indonesia.
________________________________________
Pastikan login pada server anda adalah sebagai root

1. Instalasi Kernel 2.4.22
Untuk instalasi kernel, anda bisa membaca artikel mas asfik dengan judul kompilasi kernel 2.4.x di linux
dan tambahankan
bagian QOS and/or fair queueing
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_CSZ=m
CONFIG_NET_SCH_ATM=m
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_POLICE=y

1.1 Atau install kernel cara saya (semoga anda beruntung!!)

[root@probiotik hanny]#cd /usr/src
[root@probiotik src]#wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.gz
[root@probiotik src]#tar -xzvf linux-2.4.22.tar.gz
[root@probiotik src]#ln -s linux-2.4.22 linux
[root@probiotik src]#cd linux
[root@probiotik linux]#make mrproper

Anda bisa copy salinan dari config kernel saya
[root@probiotik linux]#wget http://www.rsds.or.id/linux/configure/config-kernel.2.4.22.hanny
[root@probiotik linux]#mv config-kernel.2.4.22.hanny .config

Tambahkan atau Kurangi hadware pendukung yang anda punya, seperti :
Processor type and features —>
SCSI support —>
Network device support —>
Amateur Radio support —>
IrDA (infrared) support —>
Sound —>
USB support —>
Bluetooth support —>

[root@probiotik linux]#make menuconfig
[root@probiotik linux]#make modules; make modules_install
[root@probiotik linux]#make bzImage
[root@probiotik linux]#cp System.map /boot/System.map-2.4.22
[root@probiotik linux]#cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.22

1.2 Tambahkan kernel baru anda pada lilo.conf
[root@probiotik linux]#vi /etc/lilo.conf

#——–Isi lilo.conf————
prompt
boot=/dev/hda
timeout=50
message=/boot/message
install=/boot/boot.b
root=/dev/hda2
default=2.4.22
linear

#kernel lama
image=/boot/vmlinuz-2.4.7-10
label=2.4.7-10
root=/dev/hda2
read-only
initrd=/boot/initrd-2.4.7-10.img

#kernel baru
image=/boot/vmlinuz-2.4.22
label=2.4.22
root=/dev/hda2
read-only
#——————————–

1.3 Aktivkan kernel baru dan restart linux anda
[root@probiotik linux]#/sbin/lilo -v
[root@probiotik linux]#/sbin/lilo
[root@probiotik linux]#reboot

1.4 Cek kernel anda
[root@probiotik hanny]#uname -a
Linux probiotik 2.4.22 #2 Wed Nov 12 12:55:20 WIT 2003 i686 unknown

2. Upgrade Iptables
Untuk menghindari agar iptables linux anda masih tetap berjalan dan tidak ada troble karena kernel, sebaiknya anda upgrade iptables

2.1 Instalasi iptables-1.2.9
[root@probiotik hanny]#wget http://www.netfilter.org/files/iptables-1.2.9.tar.bz2
[root@probiotik hanny]#tar -xjvf iptables-1.2.9.tar.bz2
[root@probiotik hanny]#cd iptables-1.2.9
[root@probiotik iptables-1.2.9]#make KERNEL_DIR=/usr/src/linux
[root@probiotik iptables-1.2.9]#make install KERNEL_DIR=/usr/src/linux
[root@probiotik iptables-1.2.9]#make install-devel

2.2 Backup iptables lama anda
[root@probiotik iptables-1.2.9]#mv /sbin/ip6tables /sbin/ip6tables.old
[root@probiotik iptables-1.2.9]#mv /sbin/iptables /sbin/iptables.old
[root@probiotik iptables-1.2.9]#mv /sbin/iptables-restore /sbin/iptables-restore.old
[root@probiotik iptables-1.2.9]#mv /sbin/iptables-save /sbin/iptables-save.old

2.2 Menggunakan iptables baru
[root@probiotik iptables-1.2.9]#ln -s /usr/local/sbin/ip6tables /sbin/
[root@probiotik iptables-1.2.9]#ln -s /usr/local/sbin/iptables /sbin/
[root@probiotik iptables-1.2.9]#ln -s /usr/local/sbin/iptables-restore /sbin/
[root@probiotik iptables-1.2.9]#ln -s /usr/local/sbin/iptables-save /sbin/

2.3 Coba jalankan iptables baru
[root@probiotik iptables-1.2.9]#iptables
iptables v1.2.9: no command specified
Try `iptables -h’ or ‘iptables –help’ for more information.
________________________________________

Dalam percobaan yang saya lakukan, ada 3 buah komputer.
Total Bandwith Internet downlink 128 Kbps dan upstrime = 64 Kbps.
komputer 1 bernama hanny dengan ip 192.168.1.2, akan di beri jatah downlink 64 Kbps, upstrime 32Kbps.
komputer 2 bernama dedy dengan ip 192.168.1.3, akan di beri jatah downlink 32Kbps, upstrime 16Kbps.
komputer 3 bernama amek dengan ip 192.168.1.4, akan di beri jatah downlink 32Kbps, upstrime 16Kbps.

Untuk HTB, bila komputer hanny tidak menggunakan internet, maka bandwith akan pakai FULLoleh komputer dedy dan komputer amek (bandwith downlink hanny 64Kbps bisa dibuat rebutan FULL oleh dedy dan amek) sedangkan (bandwith upstrime hanny 32Kbps dibuat rebutan FULL oleh dedy dan amek )

Untuk CBQ, bila komputer hanny tidak menggunakan internet, maka bandwith tidak bisa pakai FULL oleh host dedy dan host amek (bandwith downlink hanny 64Kbps bisa dibuat rebutan MAX 1 Kbps – 2 Kbps oleh dedy dan amek) sedangkan (bandwith upstrime hanny 32Kbps dibuat rebutan MAX 1 Kbps – 2 Kbps oleh dedy dan amek )
________________________________________

3. INSTALASI HTB (Hierachical Token Bucket)
Ada banyak cara untuk membuat shapper htb, anda bisa membuat secara manual dengan command tc
atau anda bisa mengunakan htb.init. Kebetulan saya menggunakan htb.init 🙂

3.1 Persiapan untuk config htb.init
Download htb.init
[root@probiotik iptables-1.2.9]#wget http://keihanna.dl.sourceforge.net/sourceforge/htbinit/htb.init-v0.8.4
[root@probiotik iptables-1.2.9]#mv htb.init-v0.8.4 /sbin/
[root@probiotik iptables-1.2.9]#chmod 755 htb.init-v0.8.4

3.2 Membuat config pada /etc/sysconfig
[root@probiotik iptables-1.2.9]#mkdir /etc/sysconfig/htb
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:40.amek
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:40.amek

Isi dari masing-masing config htb adalah sebagai berikut:
eth0 eth0-10.root eth0-10:20.hanny eth0-10:30.dedy eth0-10:40.amek
R2Q=1 RATE=64Kbit
QUANTUM=1500 RATE=32Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.2/32, RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.3/32, RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.4/32,

eth1 eth1-10.root eth1-10:20.hanny eth1-10:30.dedy eth1-10:40.amek
R2Q=1 RATE=128Kbit
QUANTUM=1500 RATE=64Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.2/32 RATE=32Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.3/32 RATE=32Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.4/32
Bila masih bertanya tanya apa yang dimaksud dgn RATE,QUANTUM,CEIL,LEAF,RULE,dll
anda dapat membaca pada file htb.init
[root@probiotik iptables-1.2.9]#vi /sbin/htb.init-v0.8.4
atau lihat http://www.docum.org/stef.coene/qos/faq/cache/29.html

3.3 Jalankan htb.init
Karena command tc (Trafic Control) terdapat kekurangan, maka anda dapat mengambil patch http://www.rsds.or.id/linux/source/tc
[root@probiotik iptables-1.2.9]#wget http://www.rsds.or.id/linux/source/tc
[root@probiotik iptables-1.2.9]#cp tc /sbin/
[root@probiotik iptables-1.2.9]#cp tc /bin/
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4
Usage: htb.init-v0.8.4 {start|compile|stop|restart|timecheck|list|stats}

[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 compile
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 start

Lihat pesan pada log
[root@probiotik iptables-1.2.9]#tail -f /var/log/messages
Nov11 00:58:40 probiotik kernel: HTB init, kernel part version 3.12

3.4 Cek pada list module linux anda
[root@probiotik iptables-1.2.9]#lsmod
cls_route 4176 0 (unused)
cls_u32 4752 6
cls_fw 2496 0 (unused)
sch_sfq 3760 6 (unused)
sch_htb 18768 2

Bila anda sudah bosan dengan htb 🙂
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 stop

3.5 Agar bisa autorun saat restart, tambahkan script pada rc.local
[root@probiotik iptables-1.2.9]#echo /sbin/htb.init-v0.8.4 start > /etc/rc.local
4. INSTALASI CBQ (Class-Based Queueing)
Ada banyak cara untuk membuat shapper CBQ, anda bisa membuat dengan cbq.init

4.1 Persiapan untuk config CBQ.init
Download CBQ.init
[root@probiotik iptables-1.2.9]#wget http://heanet.dl.sourceforge.net/sourceforge/cbqinit/cbq.init-v0.7.1
[root@probiotik iptables-1.2.9]#mv cbq.init-v0.7.1 /sbin/
[root@probiotik iptables-1.2.9]#chmod 755 cbq.init-v0.7.1

4.2 Membuat config pada /etc/sysconfig
Bila dalam kernel lama sudah terdapat direktori /etc/sysconfig/cbq , maka anda cukup membuat file-file cbq-xxx.xxx.
Jika terdapat file example-cbq dalam direktori /etc/sysconfig/cbq, hapus dan buat file-file cbq-xxx.xxx yang baru 🙂

[root@probiotik iptables-1.2.9]#rm -rf /etc/sysconfig/cbq/
[root@probiotik iptables-1.2.9]#mkdir /etc/sysconfig/cbq
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-1001.hanny.downlink
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-1002.dedy.downlink
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-1003.amek.downlink
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-2001.hanny.upstrime
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-2002.dedy.upstrime
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/cbq/cbq-2003.amek.upstrime

Isi dari masing-masing config CBQ adalah sebagai berikut:
cbq-1001.hanny.downlink cbq-1002.dedy.downlink cbq-1003.amek.downlink
DEVICE=eth1,10Mbit,1Mbit
RATE=64Kbit
WEIGHT=6.4Kbit
LEAF=sfq
RULE=192.168.1.2/32 DEVICE=eth1,10Mbit,1Mbit
RATE=32Kbit
WEIGHT=3.2Kbit
LEAF=sfq
RULE=192.168.1.3/32 DEVICE=eth1,10Mbit,1Mbit
RATE=32Kbit
WEIGHT=3.2Kbit
LEAF=sfq
RULE=192.168.1.4/32

cbq-2001.hanny.upstrime cbq-2002.dedy.upstrime cbq-2003.amek.upstrime
DEVICE=eth0,10Mbit,1Mbit
RATE=32Kbit
WEIGHT=3.2Kbit
LEAF=sfq
RULE=192.168.1.2/32, DEVICE=eth0,10Mbit,1Mbit
RATE=16Kbit
WEIGHT=1.6Kbit
LEAF=sfq
RULE=192.168.1.3/32, DEVICE=eth0,10Mbit,1Mbit
RATE=16Kbit
WEIGHT=1.6Kbit
LEAF=sfq
RULE=192.168.1.4/32,
Bila masih bertanya tanya apa yang dimaksud dgn DEVICE,RATE,WEIGHT,LEAF,RULE,dll
anda dapat membaca pada file CBQ.init
[root@probiotik iptables-1.2.9]#vi /sbin/cbq.init-v0.7.1
atau lihat http://www.docum.org/stef.coene/qos/faq/cache/3.html

4.3 Jalankan CBQ.init
[root@probiotik iptables-1.2.9]#/sbin/cbq.init-v0.7.1
Usage: cbq.init-v0.7.1 {start|compile|stop|restart|timecheck|list|stats}

[root@probiotik iptables-1.2.9]#/sbin/cbq.init-v0.7.1 compile
[root@probiotik iptables-1.2.9]#/sbin/cbq.init-v0.7.1 start

4.4 Cek pada list module linux anda
[root@probiotik iptables-1.2.9]#lsmod
cls_route 4336 0 (unused)
cls_u32 5072 2
cls_fw 2720 0 (unused)
sch_sfq 3856 6
sch_tbf 2672 1
sch_cbq 11728 2

Bila anda sudah bosan dengan CBQ 🙂
[root@probiotik iptables-1.2.9]#/sbin/cbq.init-v0.7.1 stop

4.5 Agar bisa autorun saat restart, tambahkan script pada rc.local
[root@probiotik iptables-1.2.9]#echo /sbin/cbq.init-v0.7.1 start > /etc/rc.local
5. Tools untuk melihat limit bandwith
– MRTG http://people.ee.ethz.ch/~oetiker/webtools/mrtg/
– Iptraf http://www.linuxhelp.net/guides/iptraf/

Thank’s to
——————————————-
http://luxik.cdi.cz/~devik/qos/htb/
http://www.docum.org/stef.coene/qos/faq/cache/

Posted in Linux | Leave a Comment »

Instalasi Gateway Linux (Fedora 5)

Posted by intrik on May 1, 2007

Mungkin banyak yang senasib dengan saya ketika memulai belajar linux, apa lagi ketika lagi bener-benernya pengen pake linux, contohnya untuk Gateway Server.

Setelah saya pelajari secara singkat, sebenernya instal linux untuk gateway tuh gak susah. Ini sih ucapan dari orang yang bener-bener bodoh mengenai masalah Linux, Okeh.. kita mulai instalasi gateway linux dengan menggunakan koneksi non-dialup.

Pertama kita install linux (kebetulan saya mah adanya Mandriva 2007 dan Fedora 5, yah jadinya coba keduanya tapi sama aja tuh hasilnya.) Sedikit tips, untuk instalasi Mandriva kita bisa tekan jumlah file yang di tekan sekitar 280mb, tapi kalo Fedora, sejauh ini saya cuma bisa menekan sampai 570mb. Jadi kalo mau ringan dan nunggunya gak lama mendingan pake Mandriva.

Kalo saya waktu pake mandriva ituh dihilangkan semua pilihan paket default dan hanya memilih IPtables dengan SSH. Nah kalo di Fedora mah sedikit sableng, jadi ketika hilangkan semua pilihan .. tetep aja gede kapasitas file yang di install. kenapa hal ini dilakukan, yah selain biar ringan juga supaya installnya gak lama.

Kebetulan saya menggunakan koneksi wireless dari Pesat NET. Kira-2 topografinya milik saya seperti berikut

Antenna <-> Radio IP:167.17.75.46 <->

PC GATEWAY [eth0 IP:167.17.75.47 – eth1 IP:10.0.0.1]

<-> HUB

Kumpulkan informasi berikut dari ISP anda, karena apa?? .. karena mereka yang setting !!

IPAddress= 167.17.75.47
Gateway= 167.17.75.254
Netmask= 255.255.255.0
NS1= 202.182.168.10
NS2= 202.182.182.182

Kembali ke instalasi Gateway, pastikan semua ethernet card berjalan dengan semestinya atau terdetek.

kemudian kita edit file ifcfg-eth0, dengan editor kesukaan anda, kebetulan saya lebih suka menggunakan Joe Editor.

[root@box ~]# joe /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
USERCTL=no
IPADDR=167.16.75.47
NETMASK=255.255.255.0
GATEWAY=167.16.75.254

Jangan lupa disimpan atau di-save !

Isikan seperti diatas .. gitu ajah udah cukup koq. Sedikit penjelasan kalo pusing, 167.16.74.47 adalah IP ethernet card yang mengarah ke RADIO / POE, ah cape jelasinnya pokoknya yang di eth0 itu semua informasi IP yang diperoleh dari ISP.

nah sekarang kita buka ifcfg-eth1

[root@box ~]# joe /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPADDR=10.0.0.1
NETMASK=255.255.255.0

Jangan lupa disimpan atau di-save !

Okeh .. 10.0.0.1 itu IP yang kebetulan saya jadikan gateway untuk jaringan saya. Karena apa ? karena saya menggunakan penomoran 10.0.0.0/24 untuk jaringan internal saya. Bingung ?? huaehuahue yah bisa ajah seh anda ganti dengan 192.168.0.1 .. tapi saya senang dengan 10.0.0.1.

Setelah ifcfg-eth0 dan ifcfg-eth1 di edit .. maka giliran /etc/resolv.conf kita edit juga dan masukan informasi DNS 1 dan DNS 2 dari ISP.

[root@box ~]# joe /etc/resolv.conf

Kemudian isi DNS sesuai dengan yang anda miliki, kebetulan kalo saya diisi seperti dibawah ini

nameserver 202.182.168.10
nameserver 202.182.182.182

Jangan lupa disimpan atau di-save !
Kemudian restart network nya

[root@box ~]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0 [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]

Nah sekarang kita edit file rc.local

[root@box ~]# joe /etc/rc.local
#!/bin/sh
touch /var/lock/subsys/local

Isi defaultnya seperti diatas, kemudian kita tambahkan baris perintah

echo 1 > /proc/sys/net/ipv4/ip_forward

Fungsinya untuk mengaktifkan Forwarding IP (yah kira-kira seperti itulah maksudnya).

Kemudian kita tambahkan lagi baris perintah

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE

Nah ini fungsinya untuk sharring koneksi Internet, perintah inilah yang menjadikan komputer di client bisa browsing dengan mengisikan IP ADDRESS dari gateway yang kita tuliskan di ifcfg-eth1.

Save file-nya dan jalankan file rc.local tersebut.

[root@box ~]# /etc/rc.local
[root@box ~]#

Beres deh .. coba masukan IP Gateway yang baru kita buat didalam client.

Nah untuk yang pake ADSL sama aja prinsipnya .. di ifcfg-eth0 tinggal kita masukan IP dari ADSL Modem tersebut. Misalnya topografinya seperti dibawah ini

Internet <-> ADSL Modem IP:192.168.1.1 <-> PC GATEWAY [eth0 IP:192.168.1.2 – eth1 IP:10.0.0.1] <-> HUB

Nah beres deh .. jadi gateway nya … Beres kah ?? sampai tahap Masquerade untuk Mandriva mungkin sudah beres .. tapi kalo Fedora Core 5 ini belum … Bah .. mikir saya .. gak taunya secara default Fedora Core 5 ketika instalasi juga memasukan beberapa rules IPtables yang membuat masquerading yang dibuat tadi gak jalan .. karena gak mau pusing .. kita reset aja rulesnya dengan menggunakan script dibawah ini.

#!/bin/sh
#Set the default policies in the filter table.
#
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
#
# flush all the rules in the filter and nat tables.
#
iptables -F
iptables -t nat -F
iptables -t mangle -F
#
# erase all chains that’s not default in filter and nat table.
#
iptables -X
iptables -t nat -X
iptables -t mangle -X

Save script tersebut dan berikan nama sesuai keinginan anda, untuk kasus ini saya beri nama flush dan saya simpan di direktori /root, dan ubah mode dari file flush tersebut.

[root@box ~]# chmod +x flush

Kemudian sisipkan baris perintah /root/flush kedalam file rc.local .. letakan ke tempat yang paling atas .. sebelum baris perintah yang lain. .. sehingga isi file rc.local menjadi seperti dibawah ini ..

#!/bin/sh
#
/root/flush
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE

dan jalankan kembali file rc.local tersebut, dan silahkan mencoba browsing dari klien!

Demikian cara singkat membangun gateway server menggunakan Linux Fedora
Semoga bermanfaat

Posted in Linux | Leave a Comment »

Saya kesulitan mempelajari Linux, mohon saran agar saya

Posted by intrik on April 29, 2007

Sebuah pertanyaan singkat dengan jawaban panjang. Sebenarnya
tidak ada yang sulit di Linux jika Anda sudah memahami
dasar-dasar pengoperasian sebuah OS komputer. Jika Anda
sudah terbiasa bekerja dengan Windows, maka dalam waktu
singkat Anda akan segera memahami dan menguasai Linux.
Kesulitan yang dihadapi para pemula umumnya berkisar seputar
pemilihan distro Linux (...ya, ada ratusan 'jenis' Linux di
hadapan Anda !...), pemartisian dan teknik instalasi
(tetangga pusing, data di harddisknya hilang semua gara-gara
coba instal linux !...), dan pengaksesan file-file data yang
sudah ada (...bagaimana nasib data di Windows saya ?...).
Permasalahan selanjutnya adalah pemilihan program kerja dan
teknis pemakaian utility sistem di Linux.

Berikut beberapa tip yang kami sarankan :
Tip 1 : Pilih distro populer. Ya, cari informasi dan
dapatkan CD instalasi sebuah distro yang populer di
lingkungan Anda. Jika banyak rekan pakai Linux Mandrake,
kenapa tidak ikut pakai Mandrake. Jika warnet sebelah pakai
Linux SuSE, ya cari CD SuSE, biar bisa chatting di warnet
sebelah.
Semakin populer distro pilihan Anda, semakin banyak rekan
yang memahami dan siap membantu kesulitan Anda.
Tip 2 : Pakai Live CD. Apa itu Live CD ? Ini adalah
salah satu inovasi penggunaan sistem operasi Linux. Anda
tidak perlu menginstalasikan Linux atau mengorbankan isi
harddisk Anda untuk mengoperasikan Linux. Dengan Live CD,
Anda dapat menjalankan Linux secara aman pada komputer Anda
(baca: Windows) melalui sebuah keping CD. Anda tinggal
membooting komputer dengan Live CD, tunggu sebentar, nah...
operasikan 'komputer Linux' instan Anda.
Meskipun dijalankan dari sebuah keping CD, Anda dapat
menggunakan program dan utility Linux secara lengkap dan
normal seperti jika Anda mengoperasikan sebuah Linux yang
terinstal di harddisk. Selesai sesi ber-Linux dengan Live
CD, Anda dapat kembali menggunakan OS lama di
harddisk,seperti sediakala.
Saat ini ada beberapa pilihan distro Linux Live CD (nah!).
Bingung pilih Live CD? ingat Tip 1. Jika sudah familiar
dengan teknik pengoperasian Linux, baru instalasikan Linux
secara permanen pada harddisk Anda.
Tip 3 : Baca dan baca. Anda kesulitan mendapatkan
rekan yang tangguh di Linux ? Jangan putus asa, Linux
menyediakan dokumentasi secara lengkap mengenai berbagai hal
sesuai topik, teknik, atau program yang ingin Anda ketahui.
Sebagian dokumentasi bahkan sudah disajikan dalam bahasa
Indonesia.
Dewasa ini juga sudah tersedia buku-buku Linux, pilih
(...dan beli) topik buku sesuai kebutuhan Anda. Alternatif
lain, di internet tersedia beragam artikel dan panduan
teknis mengenai penggunaan Linux yang siap Anda download
secara gratis.
Tip 4 : Sedia payung sebelum hujan. Backup seluruh
data di harddisk Anda sebelum menginstal Linux. Pada banyak
kasus, karena salah langkah, seluruh isi harddisk musnah
setelah mencoba menginstal Linux. Siapkan keping CD
secukupnya atau pindahkan data ke harddisk lain.
Semua menjadi lebih mudah dan cepat jika Anda menginstal
Linux pada harddisk kosong / baru, tapi jika tidak ada, maka
backup data selalu disarankan. Jika Anda telah menempatkan
data pada folder tersendiri, partisi tersendiri, atau bahkan
harddisk tersendiri, maka prosedur pembackupan dan pemulihan
data (jika diperlukan) akan menjadi mudah dan cepat. Namun,
jika data Anda tersebar di berbagai pelosok folder, maka
sekarang lah saatnya Anda belajar berdisiplin dalam
mengelola data secara baik dan efisien. Lakukanlah sebelum
semuanya terlambat.
Tip 5 : Buat apa repot ? " Kenapa saya harus pusing
memikirkan hal-hal teknis, pilih distro, partisi, instal,
backup, apalagi ? Saya pakai Windows juga tidak pernah
dipusingkan cara instal, pilih OS, aplikasi, bla bla. Semua
sudah siap di PC baru ! Saya hanya ingin pakai Linux biar
aman dari sweeping, saya hanya membutuhkan PC untuk membuat
surat dan laporan-laporan rutin saja !  ".
Begitu kira-kira ungkapan sang relasi. Ya, ada benarnya juga
pemikiran ini. Anda tidak harus repot memikirkan hal-hal
teknis untuk bekerja dengan komputer Linux. Di luar sana
sudah banyak penyedia layanan teknis yang akan membantu
proses peralihan sistem di kantor Anda. Sisihkan sedikit
anggaran bagi persiapan sistem  Linux di PC, dan Anda
tinggal menggunakannya. Mudah seperti yang telah Anda
lakukan saat memakai Windows.
Tip 6 : Banyak jalan menuju data. Sama seperti di
Windows, Anda dapat bekerja dan memilih aplikasi tertentu
untuk melakukan tugas tertentu. Anda hanya perlu mengetahui
padan aplikasi dan alternatif-alternatif program yang bisa
Anda gunakan. Linux memiliki beragam software untuk berbagai
keperluan. Cara pengoperasiannya secara umum juga sama.
Open, Close, Save, Copy, Paste, adalah istilah-istilah baku
yang dapat Anda kenali di setiap program aplikasi, termasuk
di Linux.
Sebagian besar aplikasi Linux mampu membaca dan mengolah
jenis-jenis data yang telah Anda buat atau Anda miliki
ketika memakai Windows. Misalnya file data olah dokumen,
data olah angka, file presentasi, gambar, hingga koleksi
film dan lagu. Lihat Tip 2 untuk membiasakan diri dengan
aplikasi-aplikasi Linux.
Tip 7 : Siapkan kopi dan cemilan. Ini yang paling
Anda perlukan jika memutuskan menginstal Linux sendiri dan
mulai mencoba program / utility di Linux. bisa jadi Anda
akan berlama-lama di depan monitor hanya untuk menunggu
progress bar di layar segera selesai, sementara Anda belum
bisa memutar MP3 kesayangan. Selamat mencoba !

Posted in Linux | Leave a Comment »