Pagina 1 di 1

Problema Iptables

Inviato: sab 13 mag 2006, 18:54
da l1q1d
Sto cercando di appliacare queste regole a iptables :

Codice: Seleziona tutto

#!/bin/sh
IPTABLES=iptables
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe

# my pppoe ppp device
EXTIF="ppp0"
# my BT ppp device
INTIF="ppp1"
$DEPMOD -a
$MODPROBE ip_tables
$MODPROBE ip_conntrack
$MODPROBE ip_conntrack_ftp
$MODPROBE ip_conntrack_irc
$MODPROBE iptable_nat
$MODPROBE ip_nat_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j  ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
Il risultato è questo:

Codice: Seleziona tutto

iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Perchè?

Inviato: sab 13 mag 2006, 20:12
da whites11
prova a verificare che moduli hai caricati e, eventualmente, aggiorna il kernel come suggerito dagli errori

Inviato: sab 13 mag 2006, 20:39
da l1q1d
capisco tutto ma ho il 2.6.12 e i moduli sono tutti caricati...

Inviato: dom 14 mag 2006, 1:58
da phobos3576
Probabilmente hai upgradato i vari pacchetti iproute, iptraf, iptables.
In tal caso potrebbe essere necessario un kernel più recente.

Inviato: dom 14 mag 2006, 9:53
da whites11
in effetti anchi'io ho iptables 1.3.3: con kernel 2.5.14 nessun problema!

Inviato: dom 14 mag 2006, 12:56
da l1q1d
ho fatto l'upgrade a l'1.3.5 ma il risultato è il medesimo, considerando che iptables 1.3.3 funziona con il 2.4 con il 2.6 non credo che ci debbano essere problemi.

Inviato: dom 14 mag 2006, 14:25
da l1q1d
A questo punto:
Cosa deve essere compilato nel kernel per far funzionare l'iptables?

Inviato: dom 14 mag 2006, 20:57
da Paoletta
il supporto per netfilter ce l'hai?

Inviato: dom 14 mag 2006, 21:46
da l1q1d
si, alla fine ho scoperto che era proprio un bug del kernel. Passando al 2.6.16.16