Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[IPTABLES] Avec extensions et l7filter dans la USE (abandon)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Sat Oct 06, 2007 12:53 am    Post subject: [IPTABLES] Avec extensions et l7filter dans la USE (abandon) Reply with quote

Édit: Ce message est vieux et ne reflète plus ma situation. Je le laisse comme référence mais suggère de passer au deuxième message juste en bas, là ou j'en suis rendu maintenant avec ce problème.

Je faisais une mise à jour (emerge world) alors que ça a bloqué a netfilter-layer7.
Il faut que j'explique un peu ma situation.
J'utilise Gentoo sur un Pentium 2. Il y a trois cartes réseaux dedans, cette machine est le routeur de mon LAN. Mon noyau est vieux, c'est un 2.6.15-gentoo-r1. Passer à un noyau plus récent a toujours résulté en des conflits de cartes réseaux (trois marques différentes) et des conflits avec netfilter, iptables, et le truc pour le traffic shaping (tc). Je suis à "l'ancienne méthode" de tout ça je crois...
Aussi, j'ai ajouté "l7filter" dans ma variable USE car j'avais l'intention d'utiliser ce module lors du passage a un noyau plus récent, ce que je n'ai pas réussi dans la dernière année...

Voici le message d'erreur:

Quote:
18:17:52 (65.55 KB/s) - « /usr/portage/distfiles/netfilter-layer7-v2.13.tar.gz » sauvegardé [159622/159622]

* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking iptables-1.3.8.tar.bz2 ;-) ... [ ok ]
* checking netfilter-layer7-v2.13.tar.gz ;-) ... [ ok ]
* WARNING: 3rd party extensions has been enabled.
* This means that iptables will use your currently installed
* kernel in /usr/src/linux as headers for iptables.
*
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Could not find a Makefile in the kernel source directory.
* Please ensure that /usr/src/linux points to a complete set of Linux sources
*
* ERROR: net-firewall/iptables-1.3.8-r1 failed.
* Call stack:
* ebuild.sh, line 1670: Called dyn_setup
* ebuild.sh, line 719: Called qa_call 'pkg_setup'
* ebuild.sh, line 44: Called pkg_setup
* iptables-1.3.8-r1.ebuild, line 39: Called linux-info_pkg_setup
* linux-info.eclass, line 558: Called die
*
* Unable to calculate Linux Kernel version
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/net-firewall/iptables-1.3.8-r1/temp/build.log'.

Ce qui ne m'aide pas c'est que je n'ai plus les sources de ce vieux noyau. /usr/src/linux pointe vers un répertoire ou il n'y a que le .config de ce vieux noyau, que j'ai retrouvé à l'intérieur d'un .gz créé lors du démarrage.

J'ai l'impression que je n'ai pas le choix de mettre mon noyau à jour.
Est-ce que quelqu'un est en mesure de m'aider à adapter mon vieux .config de noyau 2.6.15-r1 à un 2.6.22-r8, tout en conservant mes trois cartes réseaux sans conflits (ça semblait être des conflits d'IRQ) et en continuant d'utiliser iptables et tc avec en bonus le support layer7?

_________________
Néophyte ou novice, telle est la question...


Last edited by legabier on Sun Oct 28, 2007 3:56 pm; edited 5 times in total
Back to top
View user's profile Send private message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Fri Oct 26, 2007 3:45 am    Post subject: Reply with quote

Alors un p'tit UP bien mérité; j'ai ENFIN réussi à mettre mon noyau à jour! Voila, je roule la version 2.6.22-r8 !

J'en ai profité pour compiler en modules <M> le plus de chose concernant le traffic shaping. Voici ce que me donne lsmod avec ce nouveau noyau:
Code:
Module                  Size  Used by
cls_fw                  8192  7
sch_sfq                 8960  7
sch_htb                18048  1
pppoe                  17600  2
pppox                   6792  1 pppoe
ppp_generic            22548  6 pppoe,pppox
slhc                    9344  1 ppp_generic
xt_TCPMSS               7424  1
ipt_REJECT              7552  4
iptable_filter          6404  1
xt_length               5888  3
xt_MARK                 6144  46
iptable_mangle          6272  1
ipt_MASQUERADE          6656  1
xt_tcpudp               7168  117
iptable_nat             9988  1
nf_nat                 18604  2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4      17292  2 iptable_nat
nf_conntrack           53384  4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4
nfnetlink               8472  3 nf_nat,nf_conntrack_ipv4,nf_conntrack
iptable_raw             6016  0
ip_tables              14036  4 iptable_filter,iptable_mangle,iptable_nat,iptable_raw
x_tables               14724  8 xt_TCPMSS,ipt_REJECT,xt_length,xt_MARK,ipt_MASQUERADE,xt_tcpudp,iptable_nat,ip_tables
eepro100               30016  0
e100                   34072  0
8139too                24336  0
tulip                  49184  0
scsi_wait_scan          5376  0

Il manque quelque chose? Car ça ne fonctionne pas plus!
J'ai essayé pas mal de chose que j'ai lu un peu partout. Quand j'ai tenté de comprendre patch-o-matic mais que le mot de passe du cvs n'a pas fonctionné (http://www.netfilter.org/documentation/HOWTO/fr/netfilter-extensions-HOWTO-2.html#ss2.1), j'ai un peu commencé à baisser les bras...

Voici le log de l'endroit ou ça bloque:
Code:
# emerge world
Calculating world dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 4) net-firewall/iptables-1.3.8-r1 to /
 * iptables-1.3.8.tar.bz2 RMD160 ;-) ...                                       [ ok ]
 * iptables-1.3.8.tar.bz2 SHA1 ;-) ...                                         [ ok ]
 * iptables-1.3.8.tar.bz2 SHA256 ;-) ...                                       [ ok ]
 * iptables-1.3.8.tar.bz2 size ;-) ...                                         [ ok ]
 * netfilter-layer7-v2.13.tar.gz RMD160 ;-) ...                                [ ok ]
 * netfilter-layer7-v2.13.tar.gz SHA1 ;-) ...                                  [ ok ]
 * netfilter-layer7-v2.13.tar.gz SHA256 ;-) ...                                [ ok ]
 * netfilter-layer7-v2.13.tar.gz size ;-) ...                                  [ ok ]
 * checking ebuild checksums ;-) ...                                           [ ok ]
 * checking auxfile checksums ;-) ...                                          [ ok ]
 * checking miscfile checksums ;-) ...                                         [ ok ]
 * checking iptables-1.3.8.tar.bz2 ;-) ...                                     [ ok ]
 * checking netfilter-layer7-v2.13.tar.gz ;-) ...                              [ ok ]
 * WARNING: 3rd party extensions has been enabled.
 * This means that iptables will use your currently installed
 * kernel in /usr/src/linux as headers for iptables.
 *
 * You may have to patch your kernel to allow iptables to build.
 * Please check http://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/ for patches
 * for your kernel.
 *
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.22-gentoo-r8/build
 * Found sources for kernel version:
 *     2.6.22-gentoo-r8
 *
 * ERROR: net-firewall/iptables-1.3.8-r1 failed.
 * Call stack:
 *   ebuild.sh, line 1670:   Called dyn_setup
 *   ebuild.sh, line 719:   Called qa_call 'pkg_setup'
 *   ebuild.sh, line 44:   Called pkg_setup
 *   iptables-1.3.8-r1.ebuild, line 50:   Called die
 *
 * For layer 7 support emerge net-misc/l7-filter-2.13 before this
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-firewall/iptables-1.3.8-r1/temp/build.log'.
 *

l7-filter-2.13 est masqué. J'ai utilisé un ACCEPT_KEYWORDS="~x86" pour contourner ça, mais ça n'aide pas plus...
Par défaut, c'est la version 2.8 que portage veut m'installer. À un moment donné, on me suggérait de unmerger avant de mettre à jour. Ça n'a pas plus fonctionné. En ce moment, plus aucun n'est là, plus aucun ne veut s'installer.
Code:
# emerge net-misc/l7-filter
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) net-misc/l7-filter-2.8 to /
 * additional_patch_for_2.6.13.diff RMD160 ;-) ...                               [ ok ]
 * additional_patch_for_2.6.13.diff SHA1 ;-) ...                                 [ ok ]
 * additional_patch_for_2.6.13.diff SHA256 ;-) ...                               [ ok ]
 * additional_patch_for_2.6.13.diff size ;-) ...                                 [ ok ]
 * netfilter-layer7-v2.8.tar.gz RMD160 ;-) ...                                   [ ok ]
 * netfilter-layer7-v2.8.tar.gz SHA1 ;-) ...                                     [ ok ]
 * netfilter-layer7-v2.8.tar.gz SHA256 ;-) ...                                   [ ok ]
 * netfilter-layer7-v2.8.tar.gz size ;-) ...                                     [ ok ]
 * checking ebuild checksums ;-) ...                                             [ ok ]
 * checking auxfile checksums ;-) ...                                            [ ok ]
 * checking miscfile checksums ;-) ...                                           [ ok ]
 * checking netfilter-layer7-v2.8.tar.gz ;-) ...                                 [ ok ]
 * checking additional_patch_for_2.6.13.diff ;-) ...                             [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.22-gentoo-r8/build
 * Found sources for kernel version:
 *     2.6.22-gentoo-r8
 * This may not work with all kernels. If it does not work please enter a bug at bugs.gentoo.org
 * This only patches the current kernel source code. (/usr/src/linux)
 * Its up to you to recompile the kernel with the l7 options
 *
 * You will also need to emerge iptables with the "extensions" or
 * "l7filter" USE flag (depend which version of iptables you emerge)
>>> Unpacking source...
>>> Unpacking netfilter-layer7-v2.8.tar.gz to /var/tmp/portage/net-misc/l7-filter-2.8/work
 * Applying kernel-2.6.18-2.6.19-layer7-2.8.patch ...

 * Failed Patch: kernel-2.6.18-2.6.19-layer7-2.8.patch !
 *  ( /var/tmp/portage/net-misc/l7-filter-2.8/work/netfilter-layer7-v2.8/kernel-2.6.18-2.6.19-layer7-2.8.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/net-misc/l7-filter-2.8/temp/kernel-2.6.18-2.6.19-layer7-2.8.patch-2729.out

 *
 * ERROR: net-misc/l7-filter-2.8 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_unpack
 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'
 *   ebuild.sh, line 44:   Called src_unpack
 *   l7-filter-2.8.ebuild, line 98:   Called epatch '/var/tmp/portage/net-misc/l7-filter-2.8/work/netfilter-layer7-v2.8/kernel-2.6.18-2.6.19-layer7-2.8.patch'
 *   eutils.eclass, line 304:   Called die
 *
 * Failed Patch: kernel-2.6.18-2.6.19-layer7-2.8.patch!
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-misc/l7-filter-2.8/temp/build.log'.

Code:
# ACCEPT_KEYWORDS="~x86" emerge =net-misc/l7-filter-2.13
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) net-misc/l7-filter-2.13 to /
 * additional_patch_for_2.6.13.diff RMD160 ;-) ...                          [ ok ]
 * additional_patch_for_2.6.13.diff SHA1 ;-) ...                            [ ok ]
 * additional_patch_for_2.6.13.diff SHA256 ;-) ...                          [ ok ]
 * additional_patch_for_2.6.13.diff size ;-) ...                            [ ok ]
 * netfilter-layer7-v2.13.tar.gz RMD160 ;-) ...                             [ ok ]
 * netfilter-layer7-v2.13.tar.gz SHA1 ;-) ...                               [ ok ]
 * netfilter-layer7-v2.13.tar.gz SHA256 ;-) ...                             [ ok ]
 * netfilter-layer7-v2.13.tar.gz size ;-) ...                               [ ok ]
 * checking ebuild checksums ;-) ...                                        [ ok ]
 * checking auxfile checksums ;-) ...                                       [ ok ]
 * checking miscfile checksums ;-) ...                                      [ ok ]
 * checking netfilter-layer7-v2.13.tar.gz ;-) ...                           [ ok ]
 * checking additional_patch_for_2.6.13.diff ;-) ...                        [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.22-gentoo-r8/build
 * Found sources for kernel version:
 *     2.6.22-gentoo-r8
 * This may not work with all kernels. If it does not work please enter a bug at bugs.gentoo.org
 * This only patches the current kernel source code. (/usr/src/linux)
 * Its up to you to recompile the kernel with the l7 options
 *
 * You will also need to emerge iptables with the "extensions" or
 * "l7filter" USE flag (depend which version of iptables you emerge)
>>> Unpacking source...
>>> Unpacking netfilter-layer7-v2.13.tar.gz to /var/tmp/portage/net-misc/l7-filter-2.13/work
 * Applying kernel-2.6.22-layer7-2.13.patch ...

 * Failed Patch: kernel-2.6.22-layer7-2.13.patch !
 *  ( /var/tmp/portage/net-misc/l7-filter-2.13/work/netfilter-layer7-v2.13/kernel-2.6.22-layer7-2.13.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/net-misc/l7-filter-2.13/temp/kernel-2.6.22-layer7-2.13.patch-3529.out

 *
 * ERROR: net-misc/l7-filter-2.13 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_unpack
 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'
 *   ebuild.sh, line 44:   Called src_unpack
 *   l7-filter-2.13.ebuild, line 111:   Called epatch '/var/tmp/portage/net-misc/l7-filter-2.13/work/netfilter-layer7-v2.13/kernel-2.6.22-layer7-2.13.patch'
 *   eutils.eclass, line 304:   Called die
 *
 * Failed Patch: kernel-2.6.22-layer7-2.13.patch!
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-misc/l7-filter-2.13/temp/build.log'.
 *


Des suggestions?
Est-ce que patch-o-matic était la bonne piste, si oui, quel est le mot de passe si ce n'est pas cvs ?
_________________
Néophyte ou novice, telle est la question...
Back to top
View user's profile Send private message
legabier
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 231

PostPosted: Sun Oct 28, 2007 4:26 pm    Post subject: Reply with quote

J'ai enlevé "l7filter" mais laissé "extensions" dans ma USE.
J'ai emergé ipp2p, c'est beaucoup moins poussé (http://ipp2p.org) que layer7 mais ça fera l'affaire pour le moment.

La seule chose intéressante que j'ai trouvé sur le Net était en coréen je crois (http://www.innu.pe.kr/tt/tag/patch-o-matic).
J'sais pas lire ça mais j'ai compris une partie de la procédure avec les commandes, j'ai donc tenté ceci:
Code:
cd /usr/src/linux
wget http://iptables.org/projects/iptables/files/iptables-1.3.8.tar.bz2
wget ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20071027.tar.bz2
bzip2 -cd iptables-1.3.8.tar.bz2 | tar xvf -
ln -s iptables-1.3.8 iptables
bzip2 -cd patch-o-matic-ng-20071027.tar.bz2 | tar xvf -
cd patch-o-matic-ng-20071027
export IPTABLES_DIR=/usr/src/linux/iptables
export KERNEL_DIR=/usr/src/linux
./runme --download
./runme all
genkernel all
lilo
Et tout ça a fonctionné comme sur des roulettes! pendant le runme all, j'ai fait T pour tester et Y à chaque fois qu'il ne retournait pas d'erreur. Me souviens pas avoir vu mention de layer7. Ensuite j'ai redémarré. Malheureusement, layer7 ne fonctionne pas plus... Pas plus que de réemerger iptables avec l7filter dans la USE, non plus pour emerger l7-filter, mais OK pour l7-protocols.....
Il y a une chose par contre que je me demande si j'ai bien fait:
Je n'ai pas invoqué le menuconfig car j'avais déjà fait le tour trois fois et il n'y a aucune mention de layer7 ou l7-filter ou autre nom... Est-ce que c'était une erreur? Est-ce qu'après le patchage, j'aurais justement trouvé layer7 dans menuconfig, ou alors ça n'a aucun rapport?
_________________
Néophyte ou novice, telle est la question...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum