Minggu, 03 Maret 2013

Konfigurasi ubuntu

Konfigurasi Ubuntu Server

Tutorial konfigurasi ubuntu server 12.04 untuk FTP server. FTP merupakan kependekan kata dari File Transfer Protocol, sebuah aplikasi yang mengijinkan transfer file antara komputer server dan komputer client. Aplikasi FTP merupakan aplikasi yang sangat legendaris sekali dengan berbagai macam kelebihan dan kekurangannya sampai saat ini aplikasi FTP masih banyak digunakan untuk mempermudah transfer file antara komputer client dan server. Bekerja di port 21, FTP bisa diinstall dengan sangat mudah pada sistem operasi server.
Untuk sistem operasi berbasis debian terkenal 2 macam aplikasi FTP server yang biasa digunakan yaitu VSFTPD dan PROFTPD, untuk membuat sebuah FTP server menggunakan VSFTPD di sistem operasi ubuntu bisa anda baca tutorialnya disini, pada postingan ini yang akan saya tuliskan adalah konfigurasi ftp server dengan ProFTP.
Oke sekarang kita mulai konfigurasi ubuntu server 12.04 nya agar bisa dijadikan sebuah FTP server, langkah-langkahnya sebagai berikut :
1. Jalankan ubuntu server 12.04
2. Langsung install paket proftpd dari repository dengan menggunakan perintah
sudo apt-get install proftpd
3. Tunggu beberapa saat sampai muncul tampilan dibawah ini, Pilih Standalone, kemudian untuk melanjutkan proses installasi pilih Ok
ftpserver1 Konfigurasi Ubuntu Server 12.04 Untuk FTP Server
4. Setelah proses installasi selesai lanjutkan dengan mengedit file konfigurasi proftpd yang berada di direktori /etc/proftpd/proftpd.conf gunakan perintah berikut
sudo nano /etc/proftpd/proftpd.conf
5. Cari baris ServerName, kemudian ganti nama server FTP nya sesuai keinginan anda
ftpserver2 Konfigurasi Ubuntu Server 12.04 Untuk FTP Server
6. Cari baris DefaultRoot kemudian hapus tanda # yang ada di depannya, agar user hanya bisa mengupload pada direktori usernya saja.
ftpserver3 Konfigurasi Ubuntu Server 12.04 Untuk FTP Server
7. Simpan kembali file konfigurasi yang sudah diedit, kemudian restart service proftpd dengan perintah
sudo service proftpd restart
8. Silahkan coba FTP server anda bisa dengan menggunakan ftp client, ataupun dengan menggunakan command line.
ftpserver4 Konfigurasi Ubuntu Server 12.04 Untuk FTP Server
Konfigurasi Ubuntu Server 12.04 untuk FTP Server selesai, silahkan dicoba jika ada sesuatu yang hendak didiskusikan silahkan tinggalkan pesan anda lewat kotak komentar yang ada dibawah postingan ini. Selamat mencoba jangan lupa berkunjung kembali di lain kesempatan yang anda miliki.


sumber http://hanyauntuklinux.blogspot.com/2013/02/konfigurasi-ubuntu-server.html

Setting VPN di MIcrotik

VPN atau Virtual Private Network adalah tekhnologi jaringan komputer menggunakan koneksi internet untuk menghubungkan sebuah jaringan komputer (LAN) ke jaringan komputer lain ataupun dari jaringan komputer (LAN) ke PC client yang tidak terhubung ke LAN. Pada kesempatan kali ini saya akan berbagi bagaimana caranya melakukan tunneling pada VPN server di mikrotik dengan menggunakan sistem operasi windows 7. Tutorial ini nantinya akan dikembangkan pada aplikasi server PAS (Program Aplikasi Sekolah) dengan kliennya para guru pengajar di sekolah tempat saya berkerja. Dengan tujuan agar para bapak/ibu guru bisa melengkapi administrasi proses belajar mengajar bukan hanya di sekolah tetapi juga bisa dilakukan di rumah.
Langkah pertama yang harus dilakukan sebelum proses tunelling di mulai adalah dengan terlebih dahulu mengaktifkan PPTP (Point to Point Tunelling Protocol) Server yang ada di mikrotik. Pada kasus ini saya menggunakan mikrotik routerboard 450G. Caranya cukup mudah :
1. Login ke mikrotik via winbox, kemudian akses menu PPP kemudian klik PPTP Server.
2. Pastikan opsi enable dalam keadaan dicawang untuk mengaktifkan PPTP Server. Kemudian klik OK
vpn mikrotik1 Cara Mudah Setting VPN di Mikrotik dan Windows 7
2. Tambahkan user yang bisa mengakses VPN dengan mengklik tab Secrets, Name isi dengan nama user, password isi dengan password user, Service isi dengan PPTP, Local Adress isi dengan IP yang digunakan sebagai VPN gateway oleh mikrotik (IP LAN Mikrotik), kemudian pastikan Remote Adress di isi dengan IP yang masih satu subnet dengan IP di local adress, masing-masing user nantinya memiliki remote adress yang berbeda.
vpn mikrotik2 Cara Mudah Setting VPN di Mikrotik dan Windows 7
3. Sampai disini VPN server sudah siap digunakan, langkah selanjutnya yaitu setting VPN client dengan menggunakan windows 7
4. Buka Control Panel – Network and Internet – Network and Sharing Center kemudian klik Set up anew connection or network
vpn mikrotik3 Cara Mudah Setting VPN di Mikrotik dan Windows 7
5. Kemudian akan tampil pilihan Choose a connection option, pilih Connect to a workplace kemudian klik Next
vpn mikrotik4 Cara Mudah Setting VPN di Mikrotik dan Windows 7
6. Kemudian akan muncul pertanyaan Do you want to use a connection that you already have? pilih saja No, Create a new connection, lalu klik next
vpn mikrotik4 Cara Mudah Setting VPN di Mikrotik dan Windows 7
7. Saat tampil How do you want to connect? plih Use my Internet Connection (VPN)
vpn mikrotik4 Cara Mudah Setting VPN di Mikrotik dan Windows 7
8. Kemudian anda diminta memasukkan Internet Address silahkan isi dengan IP Publik dari ISP yang anda gunakan, untuk Destination Name bisa diisi dengan terserah kemauan anda
vpn7 Cara Mudah Setting VPN di Mikrotik dan Windows 7
9. Kemudian masukkan username dan password yang di buat saat setting PPTP server, kemudian klik Connect
vpn mikrotik7 Cara Mudah Setting VPN di Mikrotik dan Windows 7
10. JIka ternyata belum terkonek ke VPN, anda edit lagi properties dari Network Connection yang sudah di buat, pastikan type of VPN pilih yang PPTP, data encryption pilih No Encryption allowed, kemudian coba konekkan lagi.




vpn mikrotik8 Cara Mudah Setting VPN di Mikrotik dan Windows 7
















sumber: http://hanyauntuklinux.blogspot.com/2013/02/setting-vpn-di-mikrotik.html

link good

http://ipanripai.com/linux/cara-install-lazarus-di-ubuntu




Lazarus juga

tambah2nya

From SourceForge

Binary releases for various platforms are available via the Lazarus Sourceforge download area.
For people who are blocked by SF, the Lazarus releases from sourceforge are mirrored at:

Specific for platform

Get Lazarus for Windows - use the Sourceforge link above.
Get Lazarus for Ubuntu
Get Lazarus for Fedora
Get Lazarus for Suse
Get Lazarus for Mandriva
Get Lazarus for Mac
Lazarus on Solaris

Getting SVN

TortoiseSVN client

TortoiseSVN Client is for Windows only. You may download it from http://tortoisesvn.tigris.org/.
This page demonstrates how to download and update Lazarus SVN source, but it can be used for FPC source in the same way.

Other clients

A SVN command line client is available from the official SVN website for many platforms.
On Linux, it is recommended to install subversion using the package management system offered by your distribution. For example:
sudo apt-get install subversion

Getting Lazarus SVN development version

Using the command line

To get Lazarus for the first time:
Open a terminal/command prompt, change to the directory you wish the Lazarus folder to be created in and type:
 svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
To update Lazarus sources:
Open a terminal/command prompt, change to the lazarus directory and type:
 svn update
For compiling see here.

Alternative URLs

Sometimes the URL of repository given above does not work, because between the svn server there is a http-proxy server. That server usually claims to be a 'transparent' proxy, but still doesn't pass your svn commands correctly to the svn.freepascal.org server.
The svn.freepascal.org server also listens on port 8080. Maybe the proxy doesn't interfere with http trafic on that port, so you can try:
svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus 
The Lazarus svn repostory is mirrored on sourceforge with a delay of 3 minutes using svnsync. The sourceforge repository uses the https protocol. Proxy servers usually don't interfere with that protocol. You can check out form sourceforge using the following command
svn co https://lazarus.svn.sourceforge.net/svnroot/lazarus/trunk lazarus
The FPC and Lazarus svn repostories are also mirrored to svn2.freepascal.org. You can check out from svn2.freepascal.org with
svn co http://svn2.freepascal.org/svn/lazarus/trunk lazarus
If you own the proxy server, or are friends with the person who does, there are details of setting up a proxy to pass svn commands here: http://subversion.tigris.org/faq.html#proxy This contains an example for squid. Remember to set up the client to use the proxy ! (For TortoiseSVN, see settings/network).

Scripts

There are scripts for Windows and Linux to automate downloading and building Lazarus: Scripts for Lazarus

Compiling and installing Lazarus

See Installing Lazarus - a detailed installation guide, or http://www.stack.nl/~marcov/buildfaq.pdf - still more detailed guide.

Using the command-line

Lazarus is shipped with Makefile for gnu make util. (Be warned, if you also have Codegear (or Borland) tools installed, it might conflict with gnu "make" util).
The tool allows you to compile the lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.
To compile go to Lazarus directory in your terminal and type
 make
This should rebuild LCL and Lazarus IDE (with basic packages installed).

Make targets

To see a list of available targets for make type make help. Note: "make help" exists since 1.0. Here is the output of "make help":
 Main targets
                  Without any target, target 'all' will be invoked.
   all            build minimal IDE, lazbuild, startlazarus.
   clean          deletes files that 'all' creates
   lazbuild       build lazbuild and lcl with nogui widgetset
   bigide         as all, except that the IDE is build with a lot of extra packages
   useride        calls lazbuild to build an IDE with your active profile, requires lazbuild

 Sub targets
   registration   build package FCL
   lazutils       build package LazUtils, requires registration
   codetools      build package CodeTools, requires lazutils
   lcl            build package LCL, requires lazutils
   tools          build lazres, svn2revisioninc, updatepofiles, lrstolfm, requires LCL with nogui widgetset
   ideintf        build package IDEIntf, requires lcl
   basecomponents build synedit and lazcontrols for the LCL_PLATFORM, requires ideintf
   bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents
   starter        build startlazarus, requires basecomponents
   examples       build basic examples, requires basecomponents
                  Note: There are more examples having their own directory

 Usage examples:

 Updating svn and build a minimal IDE, startlazarus and lazbuild:
   make clean
   svn up
   make clean all

 Note: You can start lazarus with 'startlazarus'
 Note: Use the IDE or lazbuild to compile your projects/packages.

 Updating svn and build an IDE with your last set of packages:
   make clean
   svn up
   make clean lazbuild useride

 Clean up:
  There is no command to clean up a svn repository completely, but
  you can use the following command under Linux/OS X:
  svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r

Make parameters

There're also additional parameters, can be used for 'making' Lazarus.
  • OPT=%compiler_switches
the %compiler_switches is passed to each fpc call. The option is useful for specifying defines
For example:
 make bigide OPT="-dNoGdkPixBufLib -gw2" 
makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.
  • LCL_PLATFORM=%platform
%platform is the target Widgetset. It can be win32,wince,gtk,gtk2,qt,carbon,cocoa,customdrawn.
For example:
 make LCL_PLATFORM=gtk2
Rebuilds LCL and IDE for gtk2 widgetset
  • FPC=%compiler_path
or
  • PP=%compiler_path
%compiler_path is the path to a custom compiler binary you want to build the target with.

Getting FPC SVN development version

Here are some hints how to get and install the development version of FPC (at the moment 2.5.1), which contains new features, bug fixes but is less stable and contains new bugs. The compiler is not included in the Lazarus SVN, but has its own FPC SVN. You must install first the latest released FPC. Download it from here http://sourceforge.net/projects/freepascal/ and install, or see more details here: Installing the Free Pascal Compiler.
Then create a directory and download FPC from SVN:
mkdir -p ~/freepascal
cd ~/freepascal
svn co http://svn.freepascal.org/svn/fpc/trunk fpc
This will take some time.
You can also use TortoiseSVN client on Windows as explained earlier.

Compiling and installing FPC

There are many ways to compile and install FPC.
  • Use plain make.
  • Build a FPC package for your Linux distribution (.deb or .rpm file). The package allows to easily uninstall, upgrade and downgrade FPC and makes sure that all files are installed at the common places. So if something goes wrong, other users know how to help you.
In either case Lazarus must finally be configured for the new FPC.

Building and installing Free Pascal in UNIXe

The following instructions work in UNIX platforms, such as Linux, but also Mac OS X.
Building Free Pascal from source code can be useful in a number of situations. One example is when debugging a problem in the compiler, in the RTL or in the FCL. The distributed FPC installs come without debug info, but the install created from the makefiles constains debug info by default. Another use is testing the development version of the compiler, although often there are also snapshots available for that.
Step 1 - Make sure you have a compatible starting compiler installed.
Usually this will mean having installed the latest stable release.
Step 2 - Download the source of the new compiler
The first thing to do is downloading the Free Pascal source code for the version you desire to build. For example, to download the latest fixes 2.4 branch do:
svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 fpcfixes2_4
Step 3 - Build the compiler
Now enter the newly created directory and build and install Free Pascal:
 cd fpcfixes2_4
 make clean all install INSTALL_PREFIX=~
This will compile the compiler in 3 cycles, first using the already installed compiler and then using the newly compiled compiler.
It install all needed files in the specified directory. You can install to any other directory if needed. You just have to use the root account if the directory does not allow writing with your normal user account.
Step 4 - Update your fpc.cfg file
Then create a file
 ~/.fpc.cfg
It is a hidden file (note the first dot). Enter the following contents to the file. If you installed to another directory, use that instead of your home dir.
 #include /etc/fpc.cfg
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*
 -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl
This allows installing any future fpc versions into PREFIX=~ without touching that config file.
To run fpc, ~/bin must be in PATH environment variable. Usually it is there by default. You also must add path ~/lib/fpc/2.7.1 to PATH because the actual compiler binary is located there. Most Linux systems now use bash shell and this configuration can be added to ~/.bashrc (a hidden file again) :
 export PATH=~/lib/fpc/2.7.1:$PATH
Note that path separator is ":" under Linux (";" under Windows). Now see "Configure Lazarus for the new fpc" below for the next step.

Build a debian/ubuntu package

Important: This script does not create the official debian/ubuntu packages. It creates a fpc package that contains the compiler and all packages.
To build the package you need to install some packages:
sudo apt-get install libgpmg1-dev fakeroot libncurses5-dev build-essential
Go into your lazarus source directory. The directory must be writable.
cd ~/freepascal/lazarus/tools/install
./create_fpc_deb.sh fpc ~/freepascal/fpc
If you get an error about a missing file or tool you may have to install a missing package. If you get a compilation error your installed fpc is not the released compiler or you were unlucky and fetched a fpc svn reversion that contains a bug. Search help on the mailing list, forum or chat. If it ran through you now have a deb file, which you can install:
 sudo dpkg -i fpc_2.5.1-091121_i386.deb
The file name is different for you.

Build a RPM package

ToDo...

Configure Lazarus for the new FPC

Now fpc is installed either by "make install" or by using a distro specific package. The next step is to compile lazarus svn with the new compiler and tell the IDE to use the directory /home/username/freepascal/fpc as FPC source directory.
If you have not yet downloaded the lazarus svn, do it now: Development versions from SVN. For example:
cd ~/freepascal
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
This will take some time, continue with:
cd ~/freepascal/lazarus
make clean all
If this gives linker errors, you have to install some packages (build-essential, libgtk2.0-dev,libgdk-pixbuf-dev). Start the IDE:
cd ~/freepascal/lazarus
./lazarus
This is a minimal IDE without any extra packages. Now the IDE must be setup and can be built with packages:
  • Go to Tools -> Options -> Environment
  • Set lazarus directory to /home/username/freepascal/lazarus
  • Set FPC source directory to /home/username/freepascal/fpc
  • Click Ok to close the dialog
  • Tools -> Configure Build Lazarus
  • Click Build.
  • Restart the IDE
  • Now you have the latest and greatest IDE built with the latest and greatest FPC.

Development versions from Git

There is a Git mirror of the official SubVersion repository being maintained on GitHub. This mirror gets sync'ed every 15 minutes with the SubVersion repository. For more information on getting Git and cloning the Lazarus repository, follow this link: Git Mirrors. You can also use git directly with SubVersion server using git-svn link. See Lazarus git-svn for details.

Development versions from Mercurial

There is a Hg mirror of the official SubVersion repository being maintained on florianklaempfl.de.
This mirror does not exist any more. See the message from Florian Klämpfl.

Daily Snapshot method

If you don't want to use svn directly, you can try a daily snapshot. For a list of mirrors see the Lazarus Snapshots Downloads page.

Browse the Source Repository with a Web Browser

The contents of the SVN archive can also be browsed with your web-browser through this viewcvs interface.

Lazarus Distributions

There are some unofficial sites where you can find Lazarus and Free Pascal too:
  • You can get a Ubuntu LiveCD from Austrian University of Applied Sciences hosting
http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso and md5sum file is here http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5.

SUMBERNYA:  http://wiki.freepascal.org/Getting_Lazarus

Lazarus Scripts

Lagi butuh materi untuk tugas

Lazarus Scripts

Lightning: Here is a windows batch script that takes care of checking out and updating Lazarus from SVN to a subdirectory and even basic error fixing, because i have no way of knowing where Lazarus is installed it cannot compile or copy the files to your working Lazarus installation. Please save the script as getlaz.bat or some other name, however there is no warranty of any kind, use at your own risk, put it in a test directory first and make sure there is no subdirectory already called lazarus.
@echo off
REM Script for checkout and update Lazarus from SVN
echo.
 
REM Check if lazarus directory exists to update or checkout first
if exist lazarus (
echo Updating Lazarus, please wait ...
cd lazarus
svn update
if %errorlevel% NEQ 0 goto CleanupLaz
cd ..
goto Exit
)
 
echo Checking out Lazarus for the first time, this might take a while ...
svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus
goto Exit
 
:CleanupLaz
echo.
echo Something went wrong, trying to fix any problems if possible  ...
svn cleanup
if %errorlevel% NEQ 0 (
cd ..
echo.
echo Cleanup Failed ! Please check or delete/move/rename the lazarus subdirectory ...
goto Exit
)
 
cd ..
echo.
echo Cleanup complete please run the script again.
:Exit

Matthijs: In Linux I use a script (it is not very sophisticated, but does the trick) to download the latest SVN-version for Lazarus. Before I copy it here I'll explain my system. In my home-directory I have a special cvsroot-directory. In this directory I have a script for downloading Lazarus and other interesting projects. Lazarus is installed in /usr/share/lazarus. Before building a new version from SVN I make a backup, just in case the current svn is unstable. This is done by moving the /usr/share/lazarus directory to /usr/share/lazarus.bu To adapt the script to your system you only need to alter the constants defined at the start of the script. But without further ado, here is the script. But (big but) it is given without any guarantee. :) If things break you are on your own.
#!/bin/bash
 
# before you can use this script you have to checkout all files
# so first do a
# svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus
 
# Define some directories
BASEDIR=/usr/share/
LAZCVSDIR=~/cvsroot/lazarus/
LAZDIR=/usr/share/lazarus/
LAZBACKUP=/usr/share/lazarus.bu
 
# Remove old backup if it exists
date +"%T %tStart"
if [ -d $LAZBACKUP ]
then 
  date +"%T %tRemoving old backup"
  rm $LAZBACKUP -fr
else
  date +"%T %tNo backup to remove"
fi
 
date +"%T %tCreating copy of lazarus dir"
cp -R $LAZDIR $LAZBACKUP
 
# Getting stuff from svn
date +"%T %tUpdate lazarus"
svn update lazarus > ~/cvs_update.log
 
# Copying cvs-files to our laz dir.
date +"%T %tcopying files"
cp -Rf $LAZCVSDIR $BASEDIR --reply=yes
 
# Make and building of lazarus
date +"%T %tmake lazarus" 
cd $LAZDIR
make > /dev/null
date +"%T %tmake the packages"
make idepkg > /dev/null
date +"%T %tFinished"
 
 
sumber: http://wiki.freepascal.org/LazarusScripts 
lagi nyari2 bacaan untuk ditau...

Default Menjadikan Ubuntu Menjadi Router dengan IPtables






Dalam praktek ini saya ingin menghubungkan komputer klien (Ubuntu 10.04 Server) dengan internet. Sayangnya koneksi internet yang ada di rumah adalah wireless, server saya tidak punya Wireles Card dan saya tidak punya kabel yang cukup panjang untuk menghubungkan server ini dengan modem. Salah satu cara adalah menggunakan laptop saya (Ubuntu 11.04 Desktop) yang terkoneksi ke internet via WLAN Card, memfungsikan laptop ini sebagai router, sehingga saya bisa mengkoneksikan komputer Ubuntu Server tadi dengan internet dari Ethernet Card laptop saya.


Di kesempatan ini kita akan melakukannya secara manual dengan memanfaatkan IPTables chain rules.


Mari kita gambarkan kasusnya terlebih dahulu :


Internet <<==>> wlan0 <> Ubuntu gateway <> eth0 <<==>> Client PC
Langkah pertama adalah menset IP tertentu untuk eth0 (keluaran ke Client). Gunakan perintah ifconfig


sudo ifconfig eth0 10.10.10.1 netmask 255.255.255.0

Selanjutnya kita lakukan konfigurasi NAT (Network Address Translation) dengan menggunakan IPTables :


Pertama, kita buat terlebih dahulu rantai untuk forward paket


iptables -A FORWARD -o wlan0 -i eth0 -s 192.168.1.2/24 -m conntrack --ctstate NEW -j ACCEPT

Keterangan :


-A : Chain Rules yang akan kita gunakan adalah Forward
-o : Dari interface mana paket akan diteruskan, dalam hal ini dari wlan0
-i : Ke interface mana paket diteruskan, dalam hal ini eth0
-m : Menggunakan modul conntrack dan dikombinasikan dengan connection tracking NEW untuk memulai koneksi baru atau mengasosiakan dirinya dengan koneksi yang belum mengalirkan paket dari arah manapun
-j : target ACCEPT
.
Lalu berikan izin untuk melakukan forwarding dari paket yang ada (atau dari paket yang sudah mulai)


sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

Terakhir lakukan Network Address Translation


sudo iptables -A POSTROUTING -t nat -j MASQUERADE

Keterangan


POSTROUTING : Translasi address kita lakukan setelah proses routing
MASQUERADE : Melakukan NAT
.
Sekarang kita Aktifkan ip forwarding yang sudah kita buat tadi


sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

Lalu edit file /etc/sysctl.conf


Hilangkan tanda pagar di


net.ipv4.ip_forward=1

Tugas kita di komputer yang berfungsi sebagai router selesai


Di sisi klien cukup kita sesuaikan ip address-nya. Dalam kasus ini saya akan menghubungkan server Ubuntu 10.04 (tanpa GUI) ke laptop yang tadi saya jadikan router. Saya set IP static di server itu sebagai berikut :


auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.10.10.2
network 10.10.10.0
netmask 255.255.255.0
broadcast 10.10.10.255
gateway 10.10.10.1
dns-domain 8.8.8.8,8.8.4.4
Saya restart networknya dengan


sudo /etc/init.d/networking restart

Lalu saya ping sebuah situs dari Ubuntu 10.04 tadi


Selesai, komputer klien yang menggunakan Ubuntu 10.04 kini terkoneksi internet via laptop yang berfungsi sebagai router, dan saya kini bisa melakukan rsync untuk mengupdate koleksi repository Ubuntu yang dimiliki.

sumber: http://forum.rumahilmu.or.id/showthread.php?672-Menjadikan-Ubuntu-Menjadi-Router-dengan-IPtables
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/84537