Switching server off on power lost.

My home server is connected to the UPS, but it is very simple - it hasn't data interface. So when the power had switched off my server can't figure it out unless UPS's battery is full. I have found a very simple solution, which helps safely shutdown my Linux box on …

more ...

Stop using root to launch sniffers

I developed another sniffer and find myself executing testcase through sudo. While something bad not happen, I decided to look through capabilities functionality in Linux kernel. Very interesting things written in the manual:

man capabilities

My testcase started service in privileged port range and listened on loopback interface. In the …

more ...

Ganglia, iostat and gentoo

Ganglia is a very good monitoring tool. You can install backand to tracking machines (sys-cluster/ganglia) and use web frontend (sys-clusted/ganglia-web) to see pretty graphics. After installing backend, you must configure /etc/ganglia/gmond.conf

...
cluster {
  name = "jassy"
  owner = "hoxnox"
  latlong = "unspecified"
  url = "unspecified"
}
...
host {
  location = "jassy"
}
...
udp_send_channel {
  host …
more ...

SSH forwarding example

Suppose we have the following network topology: server with two interfaces 192.168.3.3 and 192.168.4.1, passthrough-pc with two interfaces: 192.168.4.2 and 128.4.1.82 and client-pc with interface 128.4.1.1. Server acts as a gateway into 192.168.3 …

more ...

Kyocera p2135d and gentoo as a CUPS printserver.

Yesterday I finally had to buy a home laser printer. I was hardly bounded by the price --- less then 5000 rubles (about 85$). It was principally because in that case my wife's employer would agree to offset the costs. The second challenge - it must be integrated into home network. Every …

more ...

QEMU

Создать диск:

qemu-img create -f qcow2 /media/data/vbox/Debian7.i386.qcow2 10G

Для KVM эмуляции надо собирать ядро и qemu с поддержкой KVM.

⚒ ~  cat /etc/portage/env/qemu.conf 
QEMU_SOFTMMU_TARGETS="i386 x86_64"
QEMU_USER_TARGETS="i386 x86_64"

⚒ ~  grep 'KVM' /usr/src/linux/.config
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_EVENTFD=y …
more ...

Samba и домен

Samba может быть сконфигурирована таким образом, чтобы возложить ответственность по авторизации пользователя на контроллер домена. Для этого необходимо собрать её с ключём ads. Затем настроить керберос (/etc/krb5.conf)

[libdefaults]
    default_realm = example.com

[realms]
    EXAMPLE.COM = {
    kdc = server.example.com
    }
[domain_realms]
    .EXAMPLE.COM = server.example.com

аутентификация в samba настраивается …

more ...