38.107.179.231 www.endofinternet.hu CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
Fifth post - Tue Sep 28 19:03:45 CEST 2010
Create RAID1 (sw) in FreeBSD
- Do some sysctl magic first, (to create raid on running systems..)
- [root@prison /home/max]# sysctl kern.geom.debugflags=16
- [root@prison /home/max]# gmirror label -v -b round-robin gm0 /dev/da0
- The device name depends on the type of your hdd, my disk is a virtual disk.
- Change your fstab values to something like this:
- [root@prison /home/max]# cat /etc/fstab
- # Device Mountpoint FStype Options Dump Pass#
- /dev/mirror/gm0s1b none swap sw 0 0
- /dev/mirror/gm0s1a / ufs rw 1 1
- /dev/mirror/gm0s1g /jail ufs rw 2 2
- /dev/mirror/gm0s1e /tmp ufs rw 2 2
- /dev/mirror/gm0s1f /usr ufs rw 2 2
- /dev/mirror/gm0s1d /var ufs rw 2 2
- /dev/acd0 /cdrom cd9660 ro,noauto 0 0
- Put this in your /boot/loader.conf
- geom_mirror_load="YES"
- [root@prison /home/max]# reboot
- [root@prison /home/max]# gmirror insert gm0 /dev/da1
- [root@prison /home/max]# gmirror status
Fourth post - Sat Jul 17 17:09:03 CEST 2010
Creating jails in FreeBSD. Jail != chroot.
[root@prison /home/max]# uname -a
FreeBSD prison.endofinternet.hu 8.0-RELEASE FreeBSD 8.0-RELEASE #1: Fri May 21 10:13:32 CEST 2010 max@prison.endofinternet.hu:/usr/obj/usr/src/sys/MAX i386
- [root@prison /home/max]# cd /usr/share/examples/cvsup/
- [root@prison /usr/share/examples/cvsup]# cp standard-supfile /root/
- [root@prison /usr/share/examples/cvsup]# cd /root/
- [root@prison /root]# csup standard-supfile
- [root@prison /root]# cd /usr/src
- [root@prison /usr/src]# make -j 4 buildworld
- [root@prison /]# cd /
- [root@prison /]# mkdir /jail
- [root@prison /]# make installworld /jail
- [root@prison /]# make distribution /jail
- [root@prison /]# mount -t devfs devfs /jail/dev
- [root@prison /]# mcedit /etc/rc.conf
- jail_enable="YES"
- jail_list="myjail"
- ifconfig_em0_alias0="192.168.1.15 netmask 255.255.255.0"
- jail_test_rootdir="/jail"
- jail_test_hostname="myjail.example.org"
- jail_test_ip="192.168.1.15"
- jail_test_devfs_enable="NO"
- [root@prison /]# /etc/rc.d/jail start myjail
- [root@prison /]# /etc/rc.d/jail stop myjail
- [root@prison /]# jls
- JID IP Address Hostname Path
- 1 192.168.1.15 myjail.example.org /jail
- [root@prison /]# jexec JID csh
- myjail#
You can download two scripts to easily create and delete jails. Use them with care. download
Third post - Mon Jul 12 21:03:31 CEST 2010
Kernel compiling in linux; the old fashioned way:
- apt-get install linux-source-`uname -r`
- cd linux-source-`uname -r`
- make clean && make mrproper
- make menuconfig
- make
- make modules_install
- Copy arch/i386/boot/bzImage to /boot/vmlinuz
- Copy System.map to /boot/System.map
- Record the changes in the bootloaders config
- /sbin/lilo - in the case of lilo
- /sbin/update-grub - in the case of grub
Second post - Mon Jul 12 10:13:10 CEST 2010
###Use it in your 0wn responsibility.###
Stress test on a mail server:
for f in `seq 1 2000`; do echo $f; mail herecomes@yourmail.tld -s "gimmeshell" < aaaa.txt; done
First post - Mon Jul 12 09:30:43 CEST 2010
Installing tor, on ubuntu latest (whatitsname);
- echo "deb http://deb.torproject.org/torproject.org experimental-lucid main" >> /etc/apt/source.list
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 886DDD89
- sudo apt-get update
- sudo apt-get install tor vidalia privoxy
- Say no to vidalias shit
- sudo echo "forward-socks5 / localhost:9050 ." >> /etc/privoxy/config
- firefox add-on "torbutton"
- sudo /etc/init.d/tor restart
- sudo /etc/init.d/privoxy restart