«

»

Tem 16 2009

Debian 5.0 IPset yaması

Kaynak: http://fxp0.org.ua/2007/jul/29/building-kernel-ipset-support-debian-way/

# Çekirdek derlemek için gerekli paketler
apt-get install linux-source-2.6.26 build-essential kernel-package initramfs-tools

# iptables ve ipset paketleri
apt-get install iptables ipset

# indirilen kaynakları arşivden çıkart
cd /usr/src
tar xjvf linux-source-2.6.26.tar.bz2
cp /boot/config-2.6.26-2-amd64 ./linux/.config
ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20090715.tar.bz2
tar xjf patch-o-matic-ng-20090715.tar.bz2
apt-get source iptables

# sembolik linkleri oluştur
ln -s linux-source-2.6.26 linux
ln -s iptables-1.4.2 iptables
cd iptables
./configure

# Patch-o-matic ile iptables yamalarını çekirdeğin kaynağına ekle
cd ../patch-o-matic-ng-20090715
KERNEL_DIR=/usr/src/linux IPTABLES_DIR=/usr/src/iptables ./runme –download
KERNEL_DIR=/usr/src/linux IPTABLES_DIR=/usr/src/iptables ./runme set

# her yama için aşağıdaki tarzda soru soracak. istediğiniz yamaları “y” cevabı ile seçin.

Do you want to apply this patch [N/y/t/f/a/r/b/w/q/?] y

# yamalama bitince aşağıdaki mesajı verecek.

Excellent! Source trees are ready for compilation.
Recompile the kernel image.
Recompile the netfilter kernel modules.
Recompile the iptables binaries.

# yamalanmış çekirdek kaynağını derle
cd ../linux
make oldconfig
# alttaki komut 40 dakika sürüyor
make-kpkg –bzimage –initrd –append-to-version=-ipset –revision=00.01 kernel_image
cd /usr/src

# derlenip Debian paketi haline getirilmiş çekirdeği kur
dpkg -i linux-image-2.6.26-ipset_00.01_amd64.deb

Çalışıp çalışmadığının testi:

# ipset -N IIBF ipmap –from=192.168.50.0 –to=192.168.50.255
# ipset -L

Name: IIBF
Type: ipmap
References: 0
Default binding:
Header: from: 192.168.50.0 to: 192.168.50.255
Members:
Bindings:

Bir Cevap Yazın

Bad Behavior has blocked 21 access attempts in the last 7 days.