All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerry Skerbitz <gsker@attbi.com>
To: netfilter-devel@lists.netfilter.org
Subject: bug in iptables-save/iptables-restore
Date: Sun, 17 Nov 2002 09:23:27 -0600	[thread overview]
Message-ID: <3DD7B46F.3050006@attbi.com> (raw)

I installed narc to build some firewall rules for me, but to fit it in 
well with the RedHat8 installation,
I wanted to put its rules in /etc/sysconfig/iptables.  I ran
iptables-save > /etc/sysconfig/iptables
Then I tried restoring it using
iptables-restore /etc/sysconfig iptables and got these errors:
#~>/sbin/iptables-restore /etc/sysconfig/iptables
iptables-restore v1.2.7a: length invalid: `!40'

Try `iptables-restore -h' or 'iptables-restore --help' for more information.

here are the offending lines created by iptables-save:
#~>iptables-save | grep length
-A CUST_LOG -p tcp -m length --length !40:68 -j LOG --log-prefix 
"PACKET_LENGTH_BAD: " --log-level 7 --log-tcp-options --log-ip-options
-A CUST_LOG -p tcp -m length --length !40:68 -j DROP
#~>

I just did some digging and figured out that the exclamation point 
should go before the --length 40:68.  I guess that's
what iptables-save should really do and clearly it's what narc does when 
it sets up the rule.

No reply necessary.   Thanks for all the work you do!

Gerry

             reply	other threads:[~2002-11-17 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-17 15:23 Gerry Skerbitz [this message]
2002-11-24 11:43 ` [PATCH] Re: bug in iptables-save/iptables-restore Michael Schwendt
2002-12-05 20:32   ` Harald Welte
2002-12-09 16:28 ` Harald Welte
2002-12-10  2:49   ` Gerry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DD7B46F.3050006@attbi.com \
    --to=gsker@attbi.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.