[Ubuntu] tunning hardy 8.04 for my labtop

sudo vi /etc/fstab
UUID=fdb68ba3-e411-4a71-8cb4-ac4e117181de / reiserfs notail,relatime 0 1
change to
UUID=fdb68ba3-e411-4a71-8cb4-ac4e117181de / reiserfs notail,noatime,relatime 0 1

sudo vi /etc/sysctl.conf
vm.swappiness=0

sudo vi /etc/init.d/rc
CONCURRENCY=shell

sudo vi /boot/grub/menu.lst
# defoptions=quiet splash
change to
# defoptions=quiet splash elevator=cfq ramdisk_size=160000
And run
sudo update-grub

sudo apt-get install preload prelink bootchart

sudo vi /etc/default/prelink
PRELINKING=unknown
change to
PRELINKING=yes

when reboot, view images
/var/log/bootchart

Disable ipv6
sudo vi /etc/modprobe.d/aliases
#alias net-pf-10 ipv6
alias net-pf-10 off ipv6
alias net-pf-10 off
alias ipv6 off

if you want disable check filesystem (fsck)
sudo touch /fastboot

force check
sudo touch /forcefsck

!——————————————————————-
vi fastboot

#! /bin/sh
### BEGIN INIT INFO
# Provides: fastboot
# Required-Start: networking
# Required-Stop: networking
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0
# Short-Description: create/delete file /fastboot .
### END INIT INFO

PATH=/sbin:/bin

. /lib/lsb/init-functions

do_start () {
log_begin_msg “Deleting /fastboot file …”
rm -f /fastboot
}
do_stop () {
log_begin_msg “Creating /fastboot file …”
touch /fastboot
}

case “$1” in
start)
do_start
;;
restart|reload|force-reload)
echo “Error: argument ‘$1’ not supported” >&2
exit 3
;;
stop)
do_stop
;;
*)
echo “Usage: $0 start|stop” >&2
exit 3
;;
esac
!——————————————————————-

sudo apt-get install sysv-rc-conf
cp fastboot /etc/init.d
sudo sysv-rc-conf
check level 2,3,4,5

[Perl] IP Spoofing ง่ายๆด้วย perl

ตัวอย่างส่ง udp packet โดย spoof source address เป็น 1.1.1.1 แล้วส่ง udp 514 ไปหา server 192.168.1.100

vi spoofing_syslog.pl
use Net::RawIP;
$n = Net::RawIP->new({
ip => {
saddr => ‘1.1.1.1’,
daddr => ‘192.168.1.100’,
},
udp => {
source => 514,
dest => 514,
data => “<28>Syslog: Spoofing source address”,
},
});
$n->send;