Loading Search...

Saturday, February 14, 2009

install grub4dos, make usb bootable from windows

actually this already posted a lot and easily found if you google.
yet, it seem not so obvious that everyone keep asking about this...

so, i try to give extreme short guide to make usb bootable by installing grub4dos from windows (NT/2000/XP/2003/Vista). i just assume those who use linux already knows about grub and grub4dos or at least they can google...

  1. make sure you login as administrator and you only have ONE single usb flashdrive plugged in to avoid any possible mistake. make sure you have backup of any valuable data on another computer
  2. download latest grub4dos here: http://download.gna.org/grub4dos/ and extract to your usb flashdrive
  3. copy the extracted grldr and menu.lst to your usb flashdrive
  4. download grubutil for windows then extract all and run grubinst_gui.exe
  5. Select from the menu 'Disk' and click 'Disk Refresh' then choose your usb device.
  6. Select 'Part List Refresh' and choose 'Whole Disk (MBR)'
  7. Click 'Install'
  8. Done.
grub4dos is now installed on your usb and your flashdrive is now bootable. close all apps and reboot to test your now bootable usb flashdisk.

in case any problem, here's troubleshooting:
  • make sure your pc and bios support booting from usb
  • some bios let you choose where to boot from by pressing F12
  • or enter your bios option and make usb-hdd as first boot option
  • make sure you setup the menu.lst accordingly to boot any os you want.

update: fixed, c:\  should be your usb flashdrive
tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain

tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain

Wednesday, February 11, 2009

postfix + postgrey + clamsmtp + sanesecurity = easy, clean & light email server

what's wrong with spamassassin? everybody else are using spamassassin for their mail server spam protection.
nothing wrong with it. it just use up too much resources. that's all.

what if we can built lighter system on lower resources system (think vps) with as good spam protection as spamassassin can provide..?

here's my attempt...

first thing first. install all at once.
sudo aptitude install postfix postgrey clamsmtp wget curl rsync gzip

then, configure postfix to use postgrey and clamsmtp.

add this to /etc/postfix/main.cf
smtpd_recipient_restrictions = permit_sasl_authenticated,
           check_policy_service inet:

content_filter = scan:[]:10026

add this to /etc/postfix/master.cf
# ClamSMTP anti virus scan filter (used by content_filter)
 scan      unix  -       -       n       -       16      smtp
   -o smtp_send_xforward_command=yes
   -o smtp_enforce_tls=no
 # For injecting mail back into postfix from the filter inet  n -       n       -       16      smtpd
   -o content_filter=
   -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
   -o smtpd_helo_restrictions=
   -o smtpd_client_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks_style=host
   -o smtpd_authorized_xforward_hosts=

restart postfix
sudo /etc/init.d/postfix restart

now, get scam and phishing signature for clamav from sanesecurity, msrbl, securiteinfo, and malwarepatrol.

$ wget ftp://seibercom.net/pub/scamp.tar.gz
$ tar zxvf scamp.tar.gz
$ vi scam.sh
# uncomment this:
# SIG_DB="/var/lib/clamav"
# IF your clamav version < 0.94 then uncomment this too:
# NO_LDB=1
# that's it. save. exit.
$ sudo cp scamp.sh /etc/cron.daily/
# run it once, the first time:
sudo /etc/cron.daily/scamp.sh

you now got a lighter email server with great spam and virus protection.
enjoy less spam!

refs: http://wiki.dennyhalim.com/postfix

-- tips & tricks on computers and gadgets denny on IT ; let's doIT documenting the brain

Monday, February 09, 2009

make sure syslog rotating your system log files

just check a computer i got and see huge system log files at /var/log.
it was last rotated september last year. it's running everyday between 8am to 8pm.

so why suddently (after sept 2008) it's stop rotating the log files?

first, see when syslog run. syslog should be executed by cron.daily
so, when this cron.daily runs?

$ cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.


# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

see... by default, all daily, weekly and montly cron runs at about 6 something in the morning. my pc has not wake at that time. that's why all the cron never executed. that's why my log grows so huge.

now, replace all 6 with 9 to make sure my pc is already awake and all cron can be executed.

how about yours? have you ever turn on your linux at 6am? if not, better go check your log files Now!

tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain