View previous topic :: View next topic |
Author |
Message |
funkoolow Guru
Joined: 21 Sep 2004 Posts: 545 Location: er paese delle anguille
|
Posted: Wed Jan 16, 2008 8:32 am Post subject: [RISOLTO] sintassi iptables cambiata? |
|
|
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. 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
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 |
|
|
federico Advocate
Joined: 18 Feb 2003 Posts: 3272 Location: Italy, Milano
|
Posted: Wed Jan 16, 2008 9:36 am Post subject: |
|
|
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 |
|
|
alex260978 n00b
Joined: 27 Jan 2007 Posts: 22
|
|
Back to top |
|
|
funkoolow Guru
Joined: 21 Sep 2004 Posts: 545 Location: er paese delle anguille
|
Posted: Wed Jan 16, 2008 4:45 pm Post subject: |
|
|
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 _________________ SabaziaLUG: il LUG a nord di Roma |
|
Back to top |
|
|
federico Advocate
Joined: 18 Feb 2003 Posts: 3272 Location: Italy, Milano
|
|
Back to top |
|
|
|
|
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
|
|