Author Topic: IPTables non funzionante  (Read 659 times)

Alexain

  • Newbie
  • *
  • Posts: 3
    • View Profile
IPTables non funzionante
« on: April 13, 2011, 12:59:54 pm »
Salve,

ho installato gentoo ma quando vado a configurare iptables mi da il sequente errore:

Code: [Select]
iptables v1.4.3.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Pare manchino i moduli all'interno del kernel per l'utlizzo di iptables, ho provato anche a ricompilare il kernel ma quando vado a fare il 'make' mi da:

Code: [Select]
scripts/kconfig/conf -s arch/x86_64/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      arch/x86_64/kernel/asm-offsets.s
arch/x86_64/kernel/asm-offsets.c:1: error: code model 'kernel' not supported in the 32 bit mode
arch/x86_64/kernel/asm-offsets.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Cosa molto strana tra l'altro perché sto usando una distro a 32bit. Come posso avere iptables funzionante?

Grazie.

thewiseguy

  • Global Moderator
  • Newbie
  • *****
  • Posts: 2
    • View Profile
Re: IPTables non funzionante
« Reply #1 on: April 14, 2011, 11:38:27 am »
Salve,

relativamente alla domanda su iptables, riportami l'output di quanto segue:

Code: [Select]
lsmod | grep iptable
Code: [Select]
find /lib/modules/ -name "*iptable*"
Per quanto riguarda la seconda domanda invece, siamo sicuri che non stai compilando a 64bit su una piattaforma 32 bit? sicuro di aver scelto l'archittura corretta?

saluti
« Last Edit: April 14, 2011, 11:40:39 am by thewiseguy »
A player who makes a team great is more valuable than a great player. Losing yourself in the group, for the good of the group, that's teamwork.

Alexain

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: IPTables non funzionante
« Reply #2 on: April 14, 2011, 12:09:00 pm »
Al primo comando non mi restituisce nulla, mentre al secondo mi da:

Code: [Select]
/lib/modules/2.6.26-2-xen-amd64/kernel/net/ipv4/netfilter/iptable_nat.ko
/lib/modules/2.6.26-2-xen-amd64/kernel/net/ipv4/netfilter/iptable_filter.ko
/lib/modules/2.6.26-2-xen-amd64/kernel/net/ipv4/netfilter/iptable_raw.ko
/lib/modules/2.6.26-2-xen-amd64/kernel/net/ipv4/netfilter/iptable_mangle.ko
/lib/modules/2.6.29-bpo.2-amd64/kernel/net/ipv4/netfilter/iptable_nat.ko
/lib/modules/2.6.29-bpo.2-amd64/kernel/net/ipv4/netfilter/iptable_filter.ko
/lib/modules/2.6.29-bpo.2-amd64/kernel/net/ipv4/netfilter/iptable_raw.ko
/lib/modules/2.6.29-bpo.2-amd64/kernel/net/ipv4/netfilter/iptable_security.ko
/lib/modules/2.6.29-bpo.2-amd64/kernel/net/ipv4/netfilter/iptable_mangle.ko
/lib/modules/2.6.31.6-custom-xen/kernel/net/ipv4/netfilter/iptable_nat.ko
/lib/modules/2.6.31.6-custom-xen/kernel/net/ipv4/netfilter/iptable_filter.ko
/lib/modules/2.6.31.6-custom-xen/kernel/net/ipv4/netfilter/iptable_raw.ko
/lib/modules/2.6.31.6-custom-xen/kernel/net/ipv4/netfilter/iptable_security.ko
/lib/modules/2.6.31.6-custom-xen/kernel/net/ipv4/netfilter/iptable_mangle.ko
/lib/modules/2.6.26-2-amd64/kernel/net/ipv4/netfilter/iptable_nat.ko
/lib/modules/2.6.26-2-amd64/kernel/net/ipv4/netfilter/iptable_filter.ko
/lib/modules/2.6.26-2-amd64/kernel/net/ipv4/netfilter/iptable_raw.ko
/lib/modules/2.6.26-2-amd64/kernel/net/ipv4/netfilter/iptable_mangle.ko

In merito alla seconda domanda, mi sono accorto dopo anche io che lui tenta di compilare a 64bit, ma non dovrebbe compilare automaticamente a 32 bit?

thewiseguy

  • Global Moderator
  • Newbie
  • *****
  • Posts: 2
    • View Profile
Re: IPTables non funzionante
« Reply #3 on: April 14, 2011, 12:31:20 pm »
salve,

per il primo punto di fatto devi caricare il modulo del kernel necessario, in base alla tua release  (che scopri con il comando uname -a) tramite il comando insmod $path. Molte distribuzioni fanno questo automaticamente..

Per il secondo punto, dipende da come stai compilando, usando make menuconfig puoi accedere alle impostazioni di architettura di compilazione.

ciao
A player who makes a team great is more valuable than a great player. Losing yourself in the group, for the good of the group, that's teamwork.