Senin, 14 September 2009

INSTAL CANON iP1980 di UBUNTU

Cara Menginstal Printer iP1980 di ubuntu :

Download dulu drivernya di Canon Europe pilih sistem operasi Linux

File hasil download masih dalam bentuk tar jadi harus diekstrak terlebih dulu

Driver ini bergantung (dependency) pada libcupsys2. Untuk itu harus di-instal terlebih dahulu dengan cara:

sudo apt-get install libcupsys2

kemudian double klik pada file .deb yang ada

Minggu, 13 September 2009

internet sharing di ubuntu

Perlengkapan

* Keyboard ngak perlu pakai mouse
* LAN card sesuaikan dengan kebutuhan, disini dipakai 2 lan
* Tool remote openssh

Aktifin root

# sudo passwd —enter (masukin pass sekarang, buat pass baru untuk root)
# su — enter (masukin pass root)

seting ip address, gunakan program editing kesayangan anda, disini saya pakai pico

root@ubuntu:~# gedit /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# Ethernet dari ISP
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1

# Ethernet LAN (gateway)
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0

Restart network

root@ubuntu:~# /etc/init.d/networking restart
* Reconfiguring network interfaces… [ OK ]

Lihat hasil dari configurasi ip address

root@ubuntu:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:37
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f37/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:882 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95253 (93.0 KB) TX bytes:36154 (35.3 KB)
Interrupt:17 Base address:0×1400

eth1 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:41
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1378 (1.3 KB) TX bytes:328 (328.0 B)
Interrupt:18 Base address:0×1480

lo 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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
———————————————–

test ping ke geteway isp

root@ubuntu:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.655 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.348 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.335 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.360 ms

ok.

Lanjut dengan seting DNS

root@ubuntu:~# gedit /etc/resolv.conf

nameserver 192.168.1.1 (ganti dengan IP DNS dari ISP)

test ping ke internet, contoh ping ke google

root@ubuntu:~# ping google.com

PING gogole.com (64.233.161.104) 56(84) bytes of data.

64 bytes from od-in-f104.google.com (64.233.161.104): icmp_seq=1 ttl=235 time=293 ms

64 bytes from od-in-f104.google.com (64.233.161.104): icmp_seq=2 ttl=235 time=294 ms

Ok,

Update ubuntu

root@ubuntu:~# apt-get update

root@ubuntu:~# apt-get upgrade (akan memakan waktu) tunggu sampai selesai


Untuk mengaktifkan ip_forward

edit file /proc/sys/net/ipv4/ip_forward (sudo gedit /proc/sys/net/ipv4/ip_forward),

ganti angka 0 menjadi 1 caranya

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



Kemudian aktifkan ip_forward, dengan mengedit file /etc/sysctl.conf

net.ipv4.ip_forward = 1



Dilanjutkan dengan Seting Internet sharing,

iptables -A POSTROUTING -j MASQUERADE -t nat -s (iplan) -o (interface ke internet)

iptables -A FORWARD -i (interface ke LAN) -s (ipLAN) -j ACCEPT




Dari keterangan diatas bisa kita ambil contoh dari parameter ip address yang kita seting diatas yaitu :

IP ke internet = 192.168.1.254 interfaces eth0

IP ke LAN = 192.168.0.1 interfaces eth1, jadi hasilnya seperti dibawah

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

iptables -A FORWARD -i eth1 -s 192.168.0.0/24 -j ACCEPT


Buka file /etc/rc.local, file ini sama fungsinya dengan autoexec.bat di window, fiel ini akan di jalankan waktu proses starup,

root@ubuntu:~# gedit /etc/rc.local

sisipkan baris perintah ip tables diatas sebelum kata exit 0

IP ke internet = 192.168.1.254 interfaces eth0

IP ke LAN = 192.168.0.1 interfaces eth1, jadi hasilnya seperti dibawah

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

iptables -A FORWARD -i eth1 -s 192.168.0.0/24 -j ACCEPT



jalankan perintah ini biar ngak perlu restart

root@ubuntu:~# /etc/rc.local

kalau ada terjadi error ikuti langkah dari awal lagi

sampai disini internet sharing untuk machine ubuntu selesai, silahkan coba test di computer client, gateway di arahkan ke ip ubuntu (192.168.0.1)


Sumber : toekangchainsaw