Google
Sany Asyari Blog - Indonesia

Archive for the 'Linux' category

Instalasi Hamachi di Debian, Ubuntu, Fedora

Sany Asyari| August 27, 2009 2:44 pm

Hasil copy paste dari

http://rafal.zelazko.info/2007/07/10/hamachi-for-debian-ubuntu/

http://www.howtoforge.com/how-to-install-hamachi-on-fedora9

Hanya untuk catatan pribadi

Install
To install hamachi on debian or ubuntu follow steps:

sudo su
aptitude install build-essential
wget -c http://www.rafekz.one.pl/hamachi_0.9.9.9.20.deb
dpkg -i hamachi_0.9.9.9.20.deb
rm hamachi_0.9.9.9.20.deb

Whats next?
If you have hamachi installed you can:

  • Join to network
    sudo hamachi -c /etc/hamachi join <network> [<password>]
  • Create your own network
    sudo hamachi -c /etc/hamachi create <network> [<password>]
  • Log in to hamachi
    sudo hamachi -c /etc/hamachi login
  • Go online
    sudo hamachi -c /etc/hamachi go-online <network>
  • List users in your networks:
    sudo invoke-rc.d hamachi status
    (you can enter this command twice to view nicknames)

1 Download Hamachi

Hamachi can be downloaded from the main website here:

https://secure.logmein.com/products/hamachi/download.asp

Download the 0.9.9.9-20 Linux version with the following filename:

hamachi-0.9.9.9-20-lnx.tar.gz

Or skip all that and do a wget on the file from the link here:

wget http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz

Ungzip and extract the tar file to a folder and then cd into the directory:

tar -xvf hamachi-0.9.9.9-20-lnx.tar.gz
cd hamachi-0.9.9.9-20-lnx

Make sure you are able to sudo or su to root for the next step.

2 Install and recompile tuncfg

In order to run hamachi you will need to fix the path for ifconfig in most Fedora-based distributions.

cd tuncfg

(I took this information from a post by feistyfeline on linuxquestions.org here is a link to the original posthttp://www.linuxquestions.org/questions/linux-software-2/cant-log-in-with-hamachi.-409344/)

Rename the original tuncfg file in that folder (only if you need to):

mv tuncfg tuncfg.backup

Use your choice of text editor to edit the tuncfg.c file. Search for the piece of code that has ifconfig. There is only one instance of that.

Change:

"ifconfig %s %u.%u.%u.%u ", ctx[i].dev,

To:

"/sbin/ifconfig %s %u.%u.%u.%u ", ctx[i].dev,

Then:

gcc tuncfg.c -o tuncfg

That recompiles tuncfg to incorporate the changes you made. Next, if you had already started tuncfg, kill all instances of tuncfg with:

killall tuncfg

Next, run the following as root to install the new tuncfg:

make install
/sbin/tuncfg

[aru@boxee hamachi-0.9.9.9-20-lnx]$ sudo make install

Copying hamachi into /usr/bin ..
Creating hamachi-init symlink ..
Compiling tuncfg ..
Copying tuncfg into /sbin ..

Hamachi is installed. See README for what to do next.

Finally, run “hamachi start” as a regular user and you may proceed as indicated in the README file.

3 Install & start Hamachi

Per the README file, install hamachi as a regular user by running hamachi-init:

hamachi-init

Initializing Hamachi configuration (/home/aru/.hamachi). Please wait ..

generating 2048-bit RSA keypair .. ok
making /home/aru/.hamachi directory .. ok
saving /home/aru/.hamachi/client.pub .. ok

hamachi start

Starting Hamachi hamachi-lnx-0.9.9.9-20 .. ok

4 Configure Hamachi

Once you are able to start Hamachi, you can then proceed to login and configure it to join a network:

hamachi login

hamachi join “networkname”

If To see other clients on your hamachi network type:

hamachi list

If no command is specified, hamachi displays its status including version, pid, online status and the nickname. Or you can get a list of commands by typing:

hamachi help

Once you’ve created or joined a network you can set up hamachi to start on boot by editing the rc.local file:

sudo vi /etc/rc.local

  /sbin/tuncfg
su - user -c "hamachi start"

Or you can set up Hamachi as a service by using a init.d script like the one described in the blog here by cannin:http://idahospuds.blogspot.com/2006/03/scitech-hamachi-as-service-in-fedora.html

#!/bin/bash
#
# hamachi         This shell script takes care of starting and stopping
#                 hamachi.
#
# chkconfig: 345 99 9
# description: hamachi is a zero-configuration VPN
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /etc/hamachi/client.pri ]  exit 0
[ -f /etc/hamachi/client.pub ]  exit 0
[ -f /usr/bin/hamachi ]  exit 0
# See how we were called.
case "$1" in
start)
 echo "Starting hamachi..."
 /sbin/tuncfg
 /usr/bin/hamachi -c /etc/hamachi start
 ;;
stop)
 echo "Stopping hamachi..."
 killall tuncfg
 /usr/bin/hamachi -c /etc/hamachi stop
 ;;
restart)
 stop
 sleep 1
 start
 ;;
  *)
 echo "Usage: hamachi {startstoprestart}\n"
 exit 1
esac
exit 0

(I actually just went with the rc.local commands as I found that as long as I leave my server running most of the time my need for a service isn’t all that great. I just needed it to startup when there is a power outage.)

Make sure to verify that both tuncfg and hamachi are running afterwards by doing a ps:

ps -ef | grep tuncfg 
ps -ef | grep hamachi

Now you can access your server from anywhere you are able to install a hamachi client from. If you want a GUI interface, you can also look into installing one from the links below.

[AjaxTerm] Mengakses ssh melalui situs anda..

Sany Asyari| September 18, 2007 11:56 am

Ingin mengakses situs anda, tapi demi keamanan bersama semua port dikantor yang tidak diperlukan harus ditutup oleh pihak ke 3. Dengan menggunakan beberapa trik maka anda bisa mengakses shell anda secara aman dan nyaman melalui website atau situs anda.

Catatan : Penulis mencoba instalasi pada Debian Lenny/Sid. Kerusakan yang ditimbulkan merupakan tanggung jawab masing-masing individu.

Show me more… »

Ip Forwading untuk Gateway

Sany Asyari| August 30, 2007 9:55 am

Kadang kala kita membutuhkan ip forwarding untuk keperluan dalam routing.

1. Misalkan PC A Memiliki IP eth0 202.10.10.10 dan IP eth1 192.10.10.10 yang dijadikan gateway dan dia langsung memforward yang lain

Show me more… »

Cara lain backup database

Sany Asyari| July 5, 2007 4:00 pm

Create file bulanan.sh

Show me more… »

Kalau Hosting Rp 100 Pertahun mau?

Sany Asyari| May 21, 2007 11:08 am

http://www.dreamhost.com/r.cgi?308230Anda mencari hosting murah? Gimana kalau saya menawarkan IDR.100 / MB / Tahun ? Apakah itu murah buat anda ? Atau Rp. 1 Jika itu anda rasa lebih murah?

Atau mau dapat diskon di dreamhost $50 pakai promocode POTONG50 dan click
https://dreamhost.com/signup/?plan=1&yearly=2

Jadi anda hanya membayar Rp. 408. 600 / Tahun ( 1 Dolar = Rp. 9000) dengan Spesifikasi :

Kapasitas HD 200 GB, Bandwidth 2000 GB atau 2 TB dan 1 Domain Gratis. Kalau dihitung maka 1 Hari anda berinfestasi Rp. 1112 .- Untuk 200 GB atau harga 1 Mega yang anda dapat sebesar Rp.0.00556 / Mega Byte (MB) atau dalam 1 bulan harga sewa 1 MB hanya Rp. 0.1668.- Kalau dilihat itu masih dibawah 1 Rupah bukan?

http://dreamhost.com

Lihat anda akan mendapatkan 200 GB.Anda bilang mahal? Saya jamin ini murah dan di Indonesia tidak ada hosting sebaik ini.

Mari kita lakukan perbandingan dengan beberapa hosting Indonesia, Misalkan Ardhosting memberikan harga termurah sebesar Rp 850.000 Untuk Paket Reseller Hosting dengan kapasitas Hanya 10 GB dan Bandwidht 90 GB. Bagaimana kalau kita perusahaan atau personal? Disana kita lihat bahwa ARD memberikan harga Rp. 900.000 Untuk server USA dengan kapasitas hanya 1 GB. Klo dreamhost server dimana? Jelas server berada di USA.

bagaimana dengan masterweb ? Harga hosting personal Untuk 8 GB biaya perbulan hanya Rp.675.000 Saja. Kala di Dreamhost Rp. 408.600 dengan kapasitas jelas hingga 20 Kali Lipatnya.

Pembayaran bisa menggunakan kartu kredit, Kebetulan saya membayar dengan kartu kredit Master Card BCA saya. Pembayaran dengan dibantu oleh google Check (Untuk mendaftar anda tinggal click disisi kanan atau sidebar situs ini) Dan TIDAK DIKENAKAN BIAYA APAPUN. Jika ditanya Aman? Jelas Sangat Aman Sekali..

Ingat Pakai Promocode POTONG50 <— Copy paste dan click
https://dreamhost.com/signup/?plan=1&yearly=2

potong50.JPG

Anda akan mendapatkan diskon $50 dan Pastinya anda akan membayar dibawah Rp 500.000 Untuk mendapatkan 1 Domain Gratis dan 200 GB Kapasitas Hosting dan 2 TB untuk bandwidth anda selama 1 Tahun dan Andapun akan mendapatkan tambahan kapasitas HD dan Bandwidht setiap bulanya..
Selamat Mencoba..

Jika ada pertanyaan dan minta bantuan menggunakan atau setelah menggunakan Promocode ini kirim Comment dibawah. Saya bantu Anda Selama 1 Tahun penuh 7 X 24 365 Secara Gratis

Saya Jamin Anda Puas.. Buat apa anda membayar Hosting Mahal di Indonesia Jika ada Hosting Murah disini…

Untuk pembayaran anda bisa membaca di link

http://sanyasyari.com/2008/02/24/cara-menggunakan-kartu-kredit-dan-debet-untuk-belanja-di-internet/

English Version

You searched hosting cheap?
if I offered IDR.100/MB/Year? That was cheap for you?
Or Rp. 1 If that you the feeling was cheaper?
Or wanted could the discount in dreamhost $50 with promocode POTONG50 and click
https://dreamhost.com/signup/?Plan=1&yearly=2

potong50.JPG

plan50.JPG

So you only paid IDR. 408. 600/the Year (1 Dollar = IDR.
9000) with the Specification: The HD capacity 200 GB, Bandwidth 2000 GB or 2 TB and 1 free domain.
If being counted then your 1 Day invesment IDR.
1112.

- To 200 GB or the price 1 Clouds that you could of IDR.0.00556/Mega Byte (MB) or in 1 rental price month 1 MB only IDR. 0,1668.

- If being seen that still was supervised 1 IDR not?
Http://dreamhost.com

See you will get 200 GB.A you every expensive?
I guarantee this was cheap and in Indonesia was not hosting was as good as this. Let’s carry out the comparison by several hosting Indonesia, For Example Ardhosting gave the cheapest price of Rp 850,000 for Paket Reseller Hosting with the capacity Only 10 GB and Bandwidht 90 of GB. Bagaimana if we the company or personal? There was seen by us that ARD gave the IDR price. 900,000 To server the USA with the capacity of only 1 of GB. Klo dreamhost server where?
Clear server was in the USA. How with masterweb?
The price hosting personal To 8 GB the cost perbulan only IDR.675.000. The time in Dreamhost IDR. 408,600 with the clear capacity through to 20 in times. Payment could use the credit card, By Chance I paid with the credit card of Master Card BCA I. Payment with was helped by google Checkout ( For Register U Can Click Banner From My Sidebar). If you was asked Safe? Clear Very Very Safe..
Remembered with Promocode POTONG50 < — Copy paste and click

https://dreamhost.com/signup/?Plan=1&yearly=2

Congratulations tried..
If having the question and asking for help used or after using Promocode this sent Comment was supervised.
Helped by me Anda Selama 1 Year was full of 7 X 24 365 For Free. I guarantee you were Satisfied..
What for you paid Hosting in Indonesian if had Hosting Cheapers in here…

Konfigurasi Secara Aman Server Web anda

Sany Asyari| March 14, 2007 3:13 pm

Hacker dalam mencari informasi tentang server yang akan diserang biasanya menggunakan netcraft

Nah jika didalam netcraft dapat kita lihat komputer itu menggunakan OS apa, aplikasi web server apa. Jika kita mengetahui versi dari server yang kita akan serang maka kita dapat mencari bug dengan menggunakan om google.

Untuk itu hal ini dapat di cegah dengan menyembunyikan informasi yang ada, yaitu dengan cara:

Show me more… »

Command Untuk mensetting Proxy

Sany Asyari| February 16, 2007 8:31 am

Anda mempunyai server linux yang berada di belakang Proxy dan ingin juga terkoneksi dengan jaringan Internet. Mudah sekali anda tinggal setting proxy anda.

Di command shell :

#> export ftp_proxy=http://proxyanda:port/
#> export http_proxy=http://proxyanda:port/

Sebagai contoh :

Proxy anda memiliki ip 192.168.0.10 maka di command shell anda ketik

#> export ftp_proxy=http://192.168.0.10:8080/
#> export http_proxy=http://192.168.0.10:8080/

Nah hal ini berguna banget buat update dan upgrade server debian anda.  Setting file ini akan di save di /etc/apt/apt.conf

#> Cat /ect/apt/apt.conf

Acquire::http::Proxy “http://192.168.0.10:8080″;

Regards

INSTALASI SQUID v1

Sany Asyari| February 8, 2007 8:50 am

Sumber situs : Maliang

Catatan : Makalah ini hanya untuk dokumentasi pribadi dan didapati dari situs lain.

INSTALASI SQUID v1

Artikel ini akan membahas bagaimana menginstal proxy web cache dengan squid yang akan sangat dibutuhkan oleh suatu lembaga yang sangat berhubungan dengan internet (misal warnet).

Catatan:
- Penginstalan dengan metode ini telah berhasil dilakukan pada sistem RH6.2, RH7.0, RH7.1, dan RH7.2
- Squid yang telah digunakan adalah squid-2.4.STABLE1-src.tar.gz dan squid-2.4.STABLE4-src.tar.gz, squid-2.4.STABLE6-src.tar.gz

o>Persiapan:
Downloadlah file-file yang dibutuhkan untuk instalasi dan optimasi squid pada direktori yg anda suka (misal /var/tmp):
- squid-2.4.STABLE6-src.tar.gz (bisa didapat di www.squid-cache.org)
- malloc.tar.gz (bisa didapat di http://debian.web.id/download/lib/malloc.tar.gz)
- floppy.tgz (bisa didapat di http://debian.web.id/download/systool/floppy.tgz)

Show me more… »

Mematikan Login Root Via SSH

Sany Asyari| February 7, 2007 4:12 pm

Untuk menjaga keamanan dari server anda, disarankan (Wajib sih) mematikan login As Root Via SSH. Caranya :

1. SSH Ke server yang mau di seting disable root login
2. Edit /etc/ssh/sshd_config
3. cari “Protocol 2,1″(Tantpa tanda kutip) dan rubah menjadi “Protocol 2″
4. selanjutnya cari “PermitRootLogin yes� dan rubah menjadi “�PermitRootLogin no�
5. simpan dan keluar
6. Lalu restart ssh
/etc/rc.d/init.d/sshd restart

Menghapus “Forgot” Password root pada mysql

Sany Asyari| January 23, 2007 10:30 am

anda lupa (forgot) password root mysql anda. Hal ini akan mempersulit kehidupdan dan kerja anda. Berikut ini cara menghapus password root mysql anda.

Stop mysql anda

#>/etc/init.d/mysql stop

Jalankan perintah ini

#> /usr/bin/mysqld_safe –skip-grant-tables &

[1] 6702
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6763]: started

Secara otomatis mysql anda akan jalan dengan metode save mode

Kemudian masuk ke mysql anda

#>mysql –user=root mysql
Enter password: -> Tekan Enter

mysql> update user set Password=PASSWORD(‘MasukkanPasswordBaruAnda‘) WHERE User=’root’;
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

mysql> exit
Bye

Restart mysql anda :

#>/etc/init.d/mysql stop

#>etc/init.d/mysql start

Sekarang coba masuk ke mysql

#>mysql -u root -p

Enter password: -> Gunakan password baru anda

Sukses… Semoga ilmu ini bermanfaat.

* Sudah saya coba di debian sarge MYsql : 4.0.24_Debian-10sarge2

Regards,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes