Sunday, March 31, 2013

how to change your dm-crypt passphrase

  1. Assuming your encrypted partition is /dev/sda5 (crypttab would say sda5_crypt)
  2. add new key: cryptsetup luksAddKey /dev/sda5
  3. reboot and test
  4. remove old key: cryptsetup luksRemoveKey /dev/sda5


Friday, March 29, 2013

how to mount read/write ntfs in macosx

Well .. i was facing same problem and i've found a solution that works perfectly for me and i can write on NTFS:

1- Install OSXFUSE == > The most important part is to check the compatibility layer within installation otherwise it wont work
2- Install fuse_wait pkg
3- Install ntfs-3g 2010.10.2 and remove the MacFuse from the customized installation (if you couldn't, just after installation, go to preference and remove the MacFuse)
4- Reboot your macbook, et Voila .. it'll work

i've got this info from this link

Hope that would help

Cheers, Soha

how to migrate VirtualBox

  1. delete all snapshots
  2. file > virtual media manager
  3. edit VirtualBox.xml

Saturday, March 23, 2013

how to limit number of connections to our server per period of time with iptables

sample - allow 2 hits once every 3 seconds

iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 3 --hitcount 2 -j DROP