How to Recover Deleted Files (rm -rf) or Accidentally click Empty Recycle Bin

So, sometimes “shit” can happen. Accidentally do rm -rf in linux OS, or click empty recycle bin in windows. Or, disk is corrupt, boot sector is broken, etc. This is a very useful tool to help you to “try” to fix it. Sometimes it works, and sometimes it doesn’t. At least you try… 😉 Err, wrong emoticon, it should be 🙁

TestDisk is OpenSource software and is licensed under the terms of the GNU General Public License (GPL v2+).

TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error (such asaccidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

TestDisk can

  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3/ext4 Backup SuperBlock
  • Undelete files from FAT, exFAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.

Download the file from here: http://www.cgsecurity.org/wiki/TestDisk_Download

 

Kind Regards,
Doddi Priyambodo

Cloning Microsoft SQL Server from a Template

SQL Server

There are several things that we need to do to deploy Microsoft SQL Server database using standardized template.

The items can be read fully from these blogs :

So, the options are :

  1. Run several PowerCLI scripts after the deployment (execute via SysPrep or vRealize Orchestrator)
  2. Use VMware Application Service and automate the deployment via vRealize Automation

 

Kind Regards,
Doddi Priyambodo

Mekanisme IP Port Forward di Linux, Mikrotik, Windows

IP & Port Forwarding. Mekanisme port forward adalah sebuah cara untuk melakukan penerusan paket ke tempat lain, tanpa client perlu mengetahui dan merasakan bahwa sebenarnya paket itu bukan ditembak ke server tujuan dari client. Melainkan dialihkan ke server yang lain.

Konfigurasi : CLIENT —>SERVER (published) —> SERVER (local)

Mekanisme untuk melakukan Port Forwarding adalah sebagai berikut :

1. LINUX

http://www.uday.com.np/tools/iptables.php (ini untuk wizard secara visualisasi)
http://linux.about.com/od/ipm_howto/a/hwtipm52t00.htm (ini script otomatisnya)

Contoh Kasus :

1). Kita ingin mengalihkan seluruh request dari client yang masuk dengan port 15035 menuju ke 192.168.121.5:15035

# iptables -t nat -I PREROUTING -p tcp –dport 15035 -j DNAT –to 192.168.121.5

Contoh lain :
# iptables -t nat -A PREROUTING -p tcp –dport 90080 -j DNAT –to 10.4.1.15:80

Contoh lain :
# iptables -t nat -A PREROUTING -d 192.168.204.90 -j DNAT –to-destination 10.19.184.2
# iptables -A FORWARD -j LOG –log-prefix ‘DROPPING: ‘ –log-level info
# tail -fn100 /dev/log/messages | grep DROPPING

2). Kita ingin menjalankan APACHE TOMCAT yang berjalan secara lokal di port 8080, tetapi kita ingin menampilkan keluar sebagai port 80 tanpa merubah konfigurasi TOMCAT, tetapi menggunakan iptables.

# iptables –table nat –append PREROUTING –protocol tcp –destination-port 80 –in-interface eth0 –jump REDIRECT –to-port 8080

Catatan:
Aturan diatas tidak bisa melakukan redirect permintaan lokal. Karena menggunakan perintah PREROUTING. Jika ada client yang jalan langsung di server, maka gunakan port 8080.

2. MIKROTIK

Berikut ini mekanisme untuk membelokkan paket dari server 202.162.111.111:80 ke 10.14.1.101:8080

/ip firewall nat add chain=dstnat dst-address=202.162.111.111 protocol=tcp dst-port=80
action=dst-nat to-addresses=10.14.1.101 to-ports=8080

3. WINDOWS

Biasanya saya menggunakan aplikasi Free dari Internet untuk tujuan ini, yaitu :
– http://www.simpleportforwarding.com/
– http://www.quantumg.net/portforward.php