Posted by: Moses Kurniawan on: February 10, 2010
Posted by: Moses Kurniawan on: February 9, 2010
Posted by: Moses Kurniawan on: February 8, 2010
iptables -A INPUT -p tcp -m tcp –dport 3306 -j ACCEPT
Posted by: Moses Kurniawan on: February 5, 2010
Posted by: Moses Kurniawan on: January 29, 2010
Posted by: Moses Kurniawan on: January 27, 2010
Posted by: Moses Kurniawan on: January 25, 2010
Posted by: Moses Kurniawan on: January 23, 2010
Posted by: Moses Kurniawan on: January 22, 2010
deb http://debian.indika.net.id/debian lenny main non-free contrib
deb http://debian.indika.net.id/debian-security lenny/updates main non-free contrib
(its actually 4 lines but I am using only 2 above lines because the 2 others are not working, dunno why, lazy enough for troubleshooting).
Saving the sources.list, then I am run apt-get update. Then I got the following errors on the end of line :W: GPG error: http://repo.ugm.ac.id lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B NO_PUBKEY 4D270D06F42584E6
W: GPG error: http://repo.ugm.ac.id lenny/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: GPG error: http://repo.ugm.ac.id stable-proposed-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
LETS GO TO THE SOLUTION !
Copy or write down the numbers and letters (9AA38DCD55BE302B at my case, from the above error). Run this command :gpg –keyserver wwwkeys.eu.pgp.net –recv-keys 9AA38DCD55BE302B
Please change the 9AA38DCD55BE302B based on your error message.
Then you will see the following messages :gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 55BE302B from hkp server wwwkeys.eu.pgp.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) <ftpmaster@debian.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
You will have a file called pubring.gpg. This is contains the GPG key for the repo.
Then run this command :apt-key add .gnupg/pubring.gpg
If success, you will just see the message "OK".
Then try apt-get update again. It must be works.Posted by: Moses Kurniawan on: January 10, 2010
sudo nano /etc/network/interfaces
4. Disini saya menggunakan setting bahwa eth0 saya menggunakan DHCP, dan eth1 diberikan IP static, maka tampak settingan saya seperti dibawah ini
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
5. Simpan file tersebut dengan menekan Ctrl+O di keyboard. Setelah selesai, keluar dari program dengan menekan Ctrl+X di keyboard.
6. Setelah itu restart konfigurasi network anda dengan mengetikkan perintah :
sudo /etc/init.d/network restart
7. Pastikan tidak ada yang FAIL, alias semuanya OK.
8. Untuk mengecek apakah kedua ethernet sudah memiliki IP, ketikkan perintah :
ifconfig
9. Coba liat ke bagian eth0 dan eth1 anda. eth0 biasanya memiliki IP address yang berbeda tergantung ISP anda. Dan untuk eth1 sudah pasti harusnya 192.168.0.1 karena tadi kita memasukkan IP tersebut untuk eth1 di file /etc/network/interfaces. Sekarang kita akan melakukan IP forwarding.
10. Edit file /proc/sys/net/ipv4/ip_forward dengan perintah :
sudo nano /proc/sys/net/ipv4/ip_forward
lalu edit angka 0 didalamnya menjadi 1.
11. Setelah itu save dengan menekan Ctrl+O. Setelah save, exit dengan menekan Ctrl+X.
12. Setelah itu edit file /etc/sysctl.conf dengan mengetikkan perintah:
sudo nano /etc/sysctl.conf
Cari line yang mengandung tulisan :
#net.ipv4.ip_forward = 1
Ubah menjadi
net.ipv4.ip_forward = 1
Itu hanya dihilangkan # nya saja sih.
Apabila line itu tidak ditemukan, tambah saja secara manual.
13. Setelah itu save dan exit (caranya sudah dijelaskan sebelumnya).
14. Setelah itu eksekusi perintah :
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
15. Perintah diatas harus ditulis persis huruf besar dan kecilnya.
16. Karena perintah iptables tadi tidak akan berjalan setelah router direstart, edit file /etc/rc.local :
sudo nano /etc/rc.local
17. Masukkan "iptables -t nat -A POSTROUTING -j MASQUERADE" (tanpa tanda kutip) ke dalam file tersebut, sebelum line "exit 0".
18. Save dan exit.
19. Apabila perlu, restart router anda dengan mengetikkan
sudo reboot
20. Sambil menunggu router anda kembali up, lakukan konfigurasi kepada semua komputer klien sesuai dengan dibawah ini:
IP address : 192.168.0.* (* bisa berapa saja, 2-255, karena 1 sudah terpakai untuk router)
Subnet Mask : 255.255.255.0
DNS : 192.168.0.1
21. Setelah itu lakukan uji coba browsing/ping dari komputer client (pastikan routernya sudah up duluan)