setelah sekian lama tidak bermain2 blog, kali ne qt belajar membuat PC Router dengan distro ubuntu 7.10 Gutsy (Gibbon Server) yang saya ambil dari http://kambing.vlsm.org, berikut langkah2 nya :
- Siapkan PC Pentium IV dengan 2 ethernet card. LAN1 utk Internet (Public) LAN2 utk (Local) terhubung ke Switch distribusi utk client di kantor.
- CD installer Ubuntu 7.10 Server i386.
- Tidak banyak buang waktu, kita langsung install .
- Boot
- Choose Language pilih : English
- Choose a countryy, territory or area pilih : Indonesia
- Detect keyboard layout pilih :No
- The origin of the keyboard pilih : U.S. English
- Ikuti langkah selanjutnya dan tunggu.
- Configure the network : DHCP
- Untuk hostname disesuikan, saya coba default
- Partition Disks dgn cara manual
Primary > ext3 > utk root / (disesuikan)
Logical > swap > utk swap (disesuikan)
- Configure time zone pilih : Jakarta
- System clock set to UTC pilih : Yes
- Set up user and passwords
Full name for the new user : Administrator
User for your account : administrator
Choose a password for the new user : *************** (disesuikan)
Re-enter password to verify : *************** (disesuikan)
- Installing the base system (tunggu proses install sedang berjalan)
- Software selection :
Sesuaikan dgn kebutuhan, saat ini saya hanya memilih SSH server.
- Finish the installation Complete - Setelah instalasi selesai, remote server dengan menggunakan putty, pastikan ketahui ip lokal server tersebut karena pd awal instalasi menggunakan DHCP.
- Setelah terhubung dgn server tersebut, setting IP Public (Internet) dan IP Local (LAN) secara static seperti dibawah ini.- root@ubuntu:/# pico /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).# The loopback network interface
auto lo
iface lo inet loopback# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255auto eth2
iface eth2 inet static
address 202.xxx.xxx.xxx
netmask 255.xxx.xxx.xxx
gateway 202.xxx.xxx.xxx
network 202.xxx.xxx.xxx
broadcast 202.xxx.xxx.xxx- next, restart network interfaces :
root@ubuntu:/# /etc/init.d/networking restart
* Reconfiguring network interfaces… [ OK ]- Pastikan setting ip sudah bener pada eth1 & eth2 :
root@ubuntu:/# ifconfig
eth1 Link encap:Ethernet HWaddr 00:40:F4:B5:1D:16
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::240:f4ff:feb5:1d16/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7410927 errors:0 dropped:0 overruns:0 frame:0
TX packets:13145891 errors:0 dropped:0 overruns:3 carrier:0
collisions:0 txqueuelen:1000
RX bytes:608038205 (579.8 MiB) TX bytes:1807218846 (1.6 GiB)
Interrupt:20 Base address:0xcc00eth2 Link encap:Ethernet HWaddr 00:02:2A:DF:24:A5
inet addr:202.xxx.xxx.xxx Bcast:202.xxx.xxx.xxx Mask:255.xxx.xxx.xxx inet6 addr: fe80::202:2aff:fedf:24a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13037962 errors:91076 dropped:0 overruns:0 frame:0
TX packets:7284592 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1705422870 (1.5 GiB) TX bytes:590661930 (563.2 MiB)
Interrupt:21 Base address:0xa800lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:792 (792.0 b) TX bytes:792 (792.0 b) - Untuk lebih complete dan stabil, serta mempermudah dalam hal install paket2 yang lainnya, alangkah baiknya kita update ke server lokal (Indonesia) utk menghemat bandwith. Kita rubah setingan repository (sources.list) :- root@ubuntu:/# pico /etc/apt/sources.listBerikut adalah daftar beberapa server repositori lokal yang menyediakan paket untuk Ubuntu 7.10 Gutsy Gibbon, pilih salah satu dari source berikut ini :
mirror.its.ac.id (ITS, INHERENT)
deb http://mirror.its.ac.id/ubuntu gutsy main multiverse restricted universe
deb http://mirror.its.ac.id/ubuntu gutsy-security main multiverse restricted universe
deb http://mirror.its.ac.id/ubuntu gutsy-backports main multiverse restricted universe
deb http://mirror.its.ac.id/ubuntu gutsy-updates main multiverse restricted universe
kambing.ui.edu (UI, Telkom, Indosat, OpenIXP, INHERENT)
deb http://kambing.ui.edu/ubuntu gutsy main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu gutsy-updates main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu gutsy-security main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu gutsy-backports main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu gutsy-proposed main restricted universe multiverse
mirror.cbn.net.id (OpenIXP)
deb http://ubuntu.cbn.net.id/Ubuntu gutsy main restricted universe multiverse
deb http://ubuntu.cbn.net.id/Ubuntu gutsy-updates main restricted universe multiverse
deb http://ubuntu.cbn.net.id/Ubuntu gutsy-security main restricted universe multiverse
deb http://ubuntu.cbn.net.id/Ubuntu gutsy-backports main restricted universe multiverse
deb http://ubuntu.cbn.net.id/Ubuntu gutsy-proposed main restricted universe multiverse
komo.vlsm.org
deb http://komo.vlsm.org/ubuntu gutsy main restricted universe multiverse
deb http://komo.vlsm.org/ubuntu gutsy-updates main restricted universe multiverse
deb http://komo.vlsm.org/ubuntu gutsy-security main restricted universe multiverse
deb http://komo.vlsm.org/ubuntu gutsy-backports main restricted universe multiverse
deb http://komo.vlsm.org/ubuntu gutsy-proposed main restricted universe multiverse
indika.net.id (OpenIXP)
deb http://ubuntu.indika.net.id/ gutsy main restricted universe multiverse
deb http://ubuntu.indika.net.id/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.indika.net.id/ gutsy-security main restricted universe multiverse
deb http://ubuntu.indika.net.id/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.indika.net.id/ gutsy-proposed main restricted universe multiverse
ftp.itb.ac.id (ITB, INHERENT)
deb ftp://ftp.itb.ac.id/pub/ubuntu gutsy main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu gutsy-updates main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu gutsy-security main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu gutsy-backports main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu gutsy-proposed main restricted universe multiverse
www.foss-id.web.id (Telkom)
deb http://dl2.foss-id.web.id/ubuntu gutsy main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu gutsy-updates main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu gutsy-security main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu gutsy-backports main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu gutsy-proposed main restricted universe multiverse- Lakukan update paket2 :
root@ubuntu:/# apt-get update - Mungkin disini bagi saya cukup penting karena, berperan sekali untuk melakukan sharing internet nya.
- Tambahkan baris
net.ipv4.ip_forward = 1
ke dalam file/etc/sysctl.conf
:
root@ubuntu:/# pico /etc/sysctl.conf - Edit file
/proc/sys/net/ipv4/ip_forward :
root@ubuntu:/# pico /proc/sys/net/ipv4/ip_forward
(ganti angka 0 menjadi 1) dnsmasq
danipmasq
:root@ubuntu:/# apt-get install dnsmasq ipmasq
- Restart
dnsmasq
:root@ubuntu:/# etc/init.d/dnsmasq restart
- Konfigurasikan
ipmasq
agar dijalankan setelah network aktif :root@ubuntu:/# dpkg-reconfigure ipmasq
- Jalankan perintah
root@ubuntu:/# iptables -t nat -A POSTROUTING -j MASQUERADE
- Tambahkan baris
- Tambahkan baris
iptables -t nat -A POSTROUTING -j MASQUERADE
root@ubuntu:/# pico /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0″ on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.iptables -t nat -A POSTROUTING -j MASQUERADEexit 0 - Setting IP pada pc klien dengan menggunakan IP static karena saya blm membuat DHCP Server.
Selesai sudah setting pc router dengan ubuntu 7.10 server ini, mudah2an bisa bermanfaat. Mohon maaf kalo ada kekurangan.
Tidak ada komentar:
Posting Komentar