Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] sintassi iptables cambiata?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Wed Jan 16, 2008 8:32 am    Post subject: [RISOLTO] sintassi iptables cambiata? Reply with quote

salve a tutti,

da quando ho aggiornato il kernel alla v 2.6.23-r3 (ricompilato dopo un bel make oldconfig) ed iptables alla 1.3.8-r2, quando avvio il servizio mi viene riportato quanto segue:

Code:
/etc/init.d/iptables start
 * Loading iptables state and starting firewall ...
iptables-restore: line 56 failed


La linea 56 corrisponde in particolare alla riga con il COMMIT della chain filter ed il problema sembra verificarsi appena importo nel file /var/lib/iptables/rules-save (che, se non sbaglio, dovrebbe essere il file usato per default in avvio a partire dalla 1.3.8) alcune vecchie regole che avevo inserito a mano diverso tempo fa nella stessa chain, eccole incluse nel file completo (sono quelle da "-A INPUT -s 60.250.89.30 -j DROP" a "-A INPUT -j REJECT --reject-with icmp-port-unreachable"):

Code:
*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4391431:4319296634]
-A INPUT -s 60.250.89.30 -j DROP
-A INPUT -s 88.36.16.34 -j DROP
-A INPUT -s 75.126.142.100 -j DROP
-A INPUT -s 85.40.160.61 -j DROP
-A INPUT -s 82.67.66.131 -j DROP
-A INPUT -s 69.143.147.220 -j DROP
-A INPUT -s 83.12.110.154 -j DROP
-A INPUT -s 80.74.146.174 -j DROP
-A INPUT -s 82.160.142.2 -j DROP
-A INPUT -s 143.225.173.151 -j DROP
-A INPUT -s 193.243.146.209 -j DROP
-A INPUT -s 61.19.32.237 -j DROP
-A INPUT -s 85.25.20.222 -j DROP
-A INPUT -s 196.217.244.170 -j DROP
-A INPUT -s 195.78.44.94 -j DROP
-A INPUT -s 127.0.0.1 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 30000:33333 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 143 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 137:139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 426 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6881:6886 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 137,138,139,445 -j ACCEPT
-A INPUT -p udp -m multiport --dports 137,138,139,445 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-port-unreachable
COMMIT


in particolare, la prima parte del tipo "-A INPUT -s [IP] -j DROP/ACCEPT" sembra non dare problemi, ma appena inserisco anche il resto mi viene restituito l'errore di cui sopra.

ovviamente non sono molto competente in materia, quindi siate tolleranti in caso di banalità sconcertanti sia nella configurazione che nella richiesta di aiuto in genere :roll:

grazie a tutti!
_________________
SabaziaLUG: il LUG a nord di Roma


Last edited by funkoolow on Wed Jan 16, 2008 4:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Wed Jan 16, 2008 9:36 am    Post subject: Reply with quote

Sto cercando di capire come mai, ma ti confermo che la prima riga di quelle dubbie non funziona neanche a me, probabilmente e' cambiato qualcosa nella sintassi se prima funzionavano...

Code:

cosino ~ # iptables -A INPUT  -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables: No chain/target/match by that name

_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
alex260978
n00b
n00b


Joined: 27 Jan 2007
Posts: 22

PostPosted: Wed Jan 16, 2008 11:31 am    Post subject: Reply with quote

federico wrote:
...
Code:

cosino ~ # iptables -A INPUT  -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables: No chain/target/match by that name


Probabilmente non viene caricato qualche modulo del kernel di Iptables, prova a vedere il seguente thread:
https://forums.gentoo.org/viewtopic-t-567196-highlight-.html?sid=11968f73782d40927d5ccc6d81a8168b

:wink:
_________________
Bye!!!
Back to top
View user's profile Send private message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Wed Jan 16, 2008 4:45 pm    Post subject: Reply with quote

era un problema di kernel, avevo qualche modulo disattivato sotto la voce "Core Netfilter configuration". Ora mi piacerebbe sapere perchè con il vecchio kernel funzionava lo stesso: o hanno spostato qualche voce, o l'oldconfig ha lisciato qualche parametro, oppure ho semplicemente toppato io (il che mi sembra la cosa più probabile...)

grazie cmq a tutti dell'aiuto, taggo risolto :roll:
_________________
SabaziaLUG: il LUG a nord di Roma
Back to top
View user's profile Send private message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Thu Jan 17, 2008 11:12 am    Post subject: Reply with quote

grazie per la dritta, mi sistemo anche io.
_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano 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