Monday, November 14, 2011

Windows 7 ICS does not work after restart

I've got these weird problems with my oldies Pentium IV..

My LAN card kept on missing.. I had to take the LAN card.. put it in another slot.. than it's shown in device manager.. BUT BUT.. after some times.. not sure how long.. or how many restart.. it's just gone.. I had to repeat the process again and again.. Until it's called LAN #4.. I managed to get the RemoveWAT software to crack the windows activation.. Then it looks fine.. not sure if this activation was causing this problem..

The second weird stuff.. I kept on doing the (Internet Connection Sharing) ICS setup after restart.. Once reboot.. it just did not work.. the setting was still there.. local network worked fine.. it's just not sharing the internet.. got this solution on the net for winxp.. it works on win7 also..


You might try this process.
  1. Disable ICS.
  2. Run the repair below.
  3. Enable ICS.

See if that keeps it from losing it's settings.


TCP/IP stack repair options for use with Windows XP with SP2/SP3.

Start, Run, CMD to open a command prompt:

In the command prompt window that opens, type type the following commands:

Note: Type only the text in bold for the following commands.

Reset TCP/IP stack to installation defaults, type: netsh int ip reset reset.log

Reset WINSOCK entries to installation defaults, type: netsh winsock reset catalog

Reboot the machine.

GSM Internet Connection Setting in Indonesia

I've just tried Telkom FLASH. I'm in Denpasar. Now is 03 June 2009. Average connection was 3 - 5 KBps. I used the per minute price, Rp. 350,- / minute, damn expensive.

Setting:

** NOTE: BE SURE TO SET THE APN TO FLASH **
username: wap
password: wap123
dial: *99#
connection string: AT+CGDCONT=1,"IP","FLASH"

for mobile phone: APN = FLASH.

The REST
dial: *99**1*1#

connection string:
AT+CGDCONT=1,"IP","AXIS"
Change "AXIS" to
"satelindogprs.com" for MATRIX/MENTARI
"www.indosat-m3.net" for IM3
"www.xlgrps.net" for XL
"internet" for TELKOMSEL
"FLASH" for TELKOM FLASH

Force Binding IP to MAC Address, Bandwidth Limiting Priority in SuSE Linux

In my small office we have 4 groups of internet users. Each group has different internet priorities. Me (of course) and my colleague manager are the first priority. Our school partners are the second, staffs are the third, and the rest is the least priority. High (first) priority has more bandwidth than the one below it.

These groups are differentiate by IP addresses in this stage.

I use SQUID as a proxy server to manage the bandwidth allocation at first. I transparently redirect all web traffic to our proxy server using iptables. SQUID can limit bandwidth by host or subnet BUT it can't prioritise them. 

A better tools is using QOS (Quality of Service) Bandwidth. As the name applied, we can prioritise the bandwidth according to the service such as port, ip address, packet types, etc.

One of the best in Linux is HTB (Hierarchical Token Bucket). I did the following (minimised):

-- begin script

#!/bin/bash
# kbps / mbps = Kilo / Mega BYTE per second
# kbit = Kilo BIT per second

DEV=eth4

tc qdisc add dev $DEV root handle 1: htb default 10
tc class add dev $DEV parent 1: classid 1:1 htb rate 1024kbit ceil 1024kbit burst 6k
tc class add dev $DEV parent 1:1 classid 1:11 htb rate 128kbit ceil 1024kbit burst 6k prio 1 
tc class add dev $DEV parent 1:1 classid 1:12 htb rate 64kbit ceil 128kbit burst 6k prio 2 
tc class add dev $DEV parent 1:1 classid 1:13 htb rate 52kbit ceil 192kbit burst 6k prio 3
tc class add dev $DEV parent 1:1 classid 1:14 htb rate 52kbit ceil 1024kbit burst 6k prio 4 
tc class add dev $DEV parent 1:1 classid 1:15 htb rate 24kbit ceil 128kbit burst 6k prio 5

tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:11 handle 20: sfq perturb 10
tc qdisc add dev $DEV parent 1:12 handle 30: sfq perturb 10
tc qdisc add dev $DEV parent 1:13 handle 40: sfq perturb 10
tc qdisc add dev $DEV parent 1:14 handle 50: sfq perturb 10
tc qdisc add dev $DEV parent 1:15 handle 60: sfq perturb 10

# Since only SQUID:3128 traffic is allowed by IPTABLES, we only manage this traffic.
U32="tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32"

# Manager HOST
$U32 match ip dst 10.2.3.4 match ip sport 3128 0xffff flowid 1:11
$U32 match ip dst 10.2.3.5 match ip sport 3128 0xffff flowid 1:11

# Partner HOST
$U32 match ip dst 10.2.3.22 match ip sport 3128 0xffff flowid 1:12
$U32 match ip dst 10.2.3.23 match ip sport 3128 0xffff flowid 1:12

# STAFF
$U32 match ip dst 10.2.3.33 match ip sport 3128 0xffff flowid 1:13
$U32 match ip dst 10.2.3.34 match ip sport 3128 0xffff flowid 1:13

# Torrent HOST
$U32 match ip dst 10.2.3.35 match ip sport 3128 0xffff flowid 1:14

#REST
$U32 match ip dst 10.2.3.0/24 match ip sport 3128 0xffff flowid 1:15

-- end script
 
You can see further explaination about the parameter use at the official website of HTB

What I love about HTB, we can borrow the bandwidth from someone who doesn't use it. This is where the ceil (ceiling) parameter important.

OK Now I can prioritise the bandwidth, I limit the download bandwidth as well in SQUID. I have ONE MORE PROBLEM. The "REST" people is very playful. They keep trying change their IP address to get into higher priority subnet. Until I found the static arp cache solution:

Edit the file /etc/ethers, put something like this
00:E0:98:94:8A:AB       10.2.3.3
00:90:F5:6B:5E:AB       10.2.3.4

then run 
# arp -f /etc/ethers -i eth4

if 10.2.3.3 is using by different mac address, it won't get to the gateway. Try to ping.

Other solution, you can filter them in the iptables such as:
iptables -A INPUT -s 10.2.3.3 -m mac --mac-source ! 00:E0:98:94:8A:AB -j DROP

Remember to load the mac module in iptables
# modprobe ipt_mac

DONE.. SLEEP WELL



InstallShield Error Code -6001

I've just finished downloading my kids PC disney game (Search for The Secret Keys - ssk.iso). I mount the iso file using PowerISO. All works great. Then things got a bit frustrated when I tried to install the game it's give me some error message with code -6001. The error message was telling me to delete TEMP directory, Temporary Internet Files directory and close all the running program. I've done all that and nothing help.

I did some googling and notice that the problem is in the installshield files. Installshield create a directory when it initiate installation. It's in C:\Program Files\Common Files\InstallShield\Professional\RunTime of mine. The SSK game is using the one inside the 0701 directory and somehow it doesn't match with this game's installation wizard.

So I move all folders inside the runtime directory above to desktop. And I re-run the autoplay from the iso file, and IT WORKED!!

It actually creates folder 0701 inside the runtime directory. If the folder exists, it won't create a new one.

The different between my old 0701 and the new one are in igdi.dll, ikernel.dll and setup.dll. Igdi.dll and setup.dll have the same size (old and new), they differ in the date. I guess these file created when we initialize the installation wizard. Ikernel.dll is different in size as well as the date modified. I think this file is causing this error.

SMS Gateway with Gammu PHP MySQL for WINXP

Setelah berkeliling melanglang buana, akhirnya saya menemukan satu software untuk SMS Gateway yang OK dan FREE. FREE is important, isn't it?

Pada saat artikel ini saya buat saya menggunakan SIEMENS C35 dengan serial PORT, dan SAMSUNG SGH-X700 dengan USB PORT. Dengan SAMSUNG SGH-X700 ini saya tidak berhasil menggunakan GAMMU.

First: Setup

Saya coba mendownload file dari office Gammu website http://www.gammu.org untuk versi Windows. Rupayanya file yang saya download dari sini perlu banyak belajar. Waktu terus berjalan, dan customer saya sudah ngga tahan karena SMSnya musti dikirim TODAY!. Kembali menjelajah dunia, akhirnya saya menemukan gammu_win32.zip yang mana telah di compile oleh seseorang sehingga bisa berjalan mulus. Search di google nama file ini, anda akan dengan mudah mendownloadnya.

Extract file tersebut, dan simpan di *contoh* c:\gammu

Second: Configuration

Buka file gammurc, rubah port dan connectionnya saja. contoh:

port = com1:
connection = at19200

yang lain dibiarkan saja, baris yang didahului dengan # tidak akan dibaca oleh program. Memang yang hanya dibutuhkan adalah 2 parameter diatas saja. Kadang yang sering jadi masalah adalah besarnya baud rate *angka dibelakang AT pada connection diatas*. Kalau tidak jalan pada 115200 anda bisa coba di 115200, 19200 atau 9600. Biasanya pada rate ini bisa berjalan dengan baik.

Third: Testing

Untuk testing anda dapat menjalankan melalui DOS Prompt seperti:
c:\gammu\gammu --identify

Hasilnya akan menunjukan model phone, seri, imei, dsb. Apabila tidak berhasil, silahkan kembali ke Second Step: Configuration

Anda juga dapat mengirimkan SMS dengan cara:
echo testing | gammu --sendsms TEXT YourMOBILENumber

Forth: MySQL

Anda harus memiliki webserver dengan PHP dan MySQL ready. Silahkan search appserv di google apabila anda belum memiliki. 

Buat database dengan nama *contoh* smsd. Lalu jalankan script mysql.sql yang ada didalam folder.

Fifth: Database Configuration

Rubah configurasi di file smsdrc. Hanya rubah bagian dibawah ini:

user = root
password =
pc = localhost
database = smsd

value setelah = disesuaikan dengan mysql anda.

Six The Last: Running as Daemon

Terakhir jalankan gammu dengan command line:
gammu --smsd MYSQL smsdrc

Lihat pada file smsdlog, sehingga anda tahu apa yang terjadi. Untuk pengiriman sms dengan jumlah besar, lihat smsdlog dengan program tail dari GNU *search tail for windows* dimana text akan dengan otomatis terupdate.

Kekurangan

Dibalik kelebihannya yang sangat banyak, ada beberapa kekurangan seperti:
  • Tidak support SAMSUNG SGH-X700 tentunya 
  • Delivery Report tidak smooth, dimana seharusnya delivery report ini akan meng-update table sentitems pada field DeliveryDateTime sehingga kita dapat mengetahui waktu sms tersebut diterima. Tapi ini tidak jalan disaya, sehingga saya menggunakan option log, dimana delivery report ini akan ditulis di log file *smsdlog*
  • Gammu menempatkan unknown error sms pada antrean berikutnya. Sehingga apabila terdapat 2 unknown error, maka gammu akan terus looping 2 sms ini. SMS yang lain tidak akan terkirim. Ini sangat tidak membuat hidup kita nyaman, harus memonitoring terus.
Unknown error ini mungkin disebabkan return error dari operator di Indonesia tidak standard untuk beberapa hal. Unknown error yang saya ketahui sementara ini dikarenakan:
  • nomer tujuan yang terdapat character
  • nomer tujuan yang tidak ada dijaringan contoh 0123495050

Virus dari Flash Disk, Disable Autorun Autoplay lewat Group Policy

Penyebaran virus sekarang ini sangat marak lewat Flash Disk. Internet seperti web, chating, messenger sudah bukan tempat yang mudah lagi untuk menyebarkan virus.

Bagaimana penyebarannya??
Windows secara default akan melakukan autorun / autoplay pada tiap CD atau FLASH DISK yang dimasukan. Sebuah windows explorer baru akan muncul berisi file-file didalam CD / Flash Disk. Ini memudahkan kita agar tidak lagi mencari-cari file yang akan kita cari di CD atau FLASH DISK.

Pada saat windows melakukan autorun ini, windows akan melihat file autorun.inf yang terdapat di dalam CD / Flash Disk. Sering kali file ini di simpan dalam bentuk hidden (tersembunyi). Disini lah letak awal penyebarannya. File autorun.inf dapat digunakan untuk melakukan execusi pada saat autorun berjalan. Contohnya dalam CD Interactive Marketing . Pada saat CD ini dimasukan maka Presentasi Interactive dari CD tersebut akan langsung muncul tanpa kita harus klik-klik.

Begitu pula virus, si pembuat virus dapat memasukan beberapa command sehingga pada saat autorun, virus tersebar. contoh virus yang saya ambil dari flash disk yang telah terinfeksi. Didalam autorun.inf:

;DaariJj05sCq4jo2Dr3d5feLDsAoikr44c5kkad2
[AutoRun]
;o93siwKqAljpwj4K4O3rL7A5wi8k3sllsf41o04J323a3koa4dd9keqka4l9q0JaJadi5K35r5DsDw2ZqD67alij0lwk8srod3krwpLsl13cK7Ks0I
open=tio8x6.cmd
;aKje2IlsiwKs3e2K4idkwdH1A44e3Da9i8ljpdwAwL4si2LjXSLK43sFd2Sw52s5iJokkD3m3q5cojDrJa5AaroiA37D14jdLkikA82w9a2dsqfldksan0LK
shell\open\Command=tio8x6.cmd
;AsJ44sqo4ioA3Cj3Z3iDak700s1ID4sdLra9054nj19O2edaa0q4Dr53sslkjd13ldr
shell\open\Default=1
;wCd4H4D9aD
shell\explore\Command=tio8x6.cmd
;ila1iaA132w3sa

baris yang dimulai dengan ; tidak ada artinya sehingga bisa disingkat seperti ini:

[AutoRun]
open=tio8x6.cmd
shell\open\Command=tio8x6.cmd
shell\open\Default=1
shell\explore\Command=tio8x6.cmd

Apa artinya?
Pada saat flash disk dimasukan, perintah diatas akan dijalankan yang mana semua itu berusaha menjalankan program tio8x6.cmd yang ada didalam flash disk tersebut. tio8x6.cmd adalah virusnya.

Bagaimana menanggulangi hal ini?
DISABLE Autorun !!

Caranya?
Ada banyak cara, ini salah satunya cara yang elegan menggunakan GROUP POLICY
  1. Click Start
  2. Pilih Run
  3. Ketik GPEdit.msc
  4. Munculkan Submenu Computer Configuration (double click untuk memunculkan)
  5. Munculkan Submenu Administrative Template (double click)
  6. Munculkan Submenu System (double click)
  7. Di sebelah kanan ada "Turn off autoplay", double click
  8. Pilih enable -> Pilih All Drives -> Apply -> OK
DONE!!

Trojan Virus Virtumonde Virtu Generic11

DAMN!

Berawal dari download torrent file berjudul "30 Hot Bikini Girls Photos.rar" dari mininova. Setelah di Extract, file tersebut menghasilkan 30 1-30.jpg.

AWAS!! JANGAN DOUBLE CLICK 1.jpg. Kalau diperhatikan icon pada 1.jpg adalah SHORTCUT. Kalau kita lihat propertinya, short ini berisikan "cmd /c 26.jpg" yang artinya akan meng-execute 26.jpg yang tidak lain adalah Trojan atau lebih lumrahnya disebut VIRUS. Beberapa artikel di web menamakan trojan ini sebagai Virtumonde, Virtu dan Generic11. Trojan ini tidak berbahaya, hanya sangat MENGGANGGU.

Trojan ini bekerja pada saat anda membuka browser anda. Berselang beberapa detik akan mem-browse sendiri menuju kesuatu website (IP: 85.17.166.170) yang menawarkan program anti-virus. JANGAN BACA website tersebut. LANGSUNG tutup browser anda.

Beberapa antivirus tidak dapat mendeteksi trojan ini pada saat ini (tgl: 22/8/8) sehingga saya kesulitan untuk bebas dari trojan ini termasuk Clam AntiVirus, NORTON ANTIVIRUS. Saya coba upload 26.jpg ke GMAIL dan YMAIL, keduanya tidak mendeteksi kalau file ini virus saat ini :((. Apakah karena trojan ini baru? hmmmm...

Spybot Search & Destroy mendeteksi sebagai Virtumonde dan Virtumonde.dll tapi tidak dapat menghapus file2 tertentu dari trojan ini. Sampai akhirnya saya mencoba MalwareBytes' Anti-Malware. Wow KEREN. Program ini sangat ringan dan cepat. Semuanya beres dalam sesaat.