S
S
Sergey Savostin2014-09-19 20:24:39
System administration
Sergey Savostin, 2014-09-19 20:24:39

What could be wrong with iptables?

*mangle
:PREROUTING ACCEPT [5276:281135]
:INPUT ACCEPT [5276:281135]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [522:204424]
:POSTROUTING ACCEPT [522:204424]
COMMIT
*filter
:FORWARD ACCEPT [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A INPUT -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -p tcp -m tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 35000:35999 --tcp-flags SYN,ACK SYN -j ACCEPT
COMMIT  <<<<<<<<<<<<<< ошибка здесь
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT

Flushing firewall rules: [  OK  ]
Setting chains to policy ACCEPT: mangle filter [  OK  ]
Unloading iptables modules: [  OK  ]
Applying iptables firewall rules: iptables-restore: line 22 failed [FAILED]

I tried to delete one rule at a time - until I delete everything, the error does not disappear. Those. Looks like something is broken =(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valentine, 2014-09-19
@vvpoloskin

Damn, paste these rules into the console and do iptables-save. Compare the result with your file.

S
Sergey Petrikov, 2014-09-19
@RicoX

Here is your error:
--dport 35000:35999
port range must be specified via
-m multiport

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question