From: Michael Schachtebeck <schachti@rbw.goe.net>
To: netfilter@lists.netfilter.org
Subject: Re: limit extension
Date: Wed, 20 Jul 2005 16:15:44 +0200 [thread overview]
Message-ID: <42DE5C90.70603@rbw.goe.net> (raw)
In-Reply-To: <42DD417F.4090804@rbw.goe.net>
Am 07/19/2005 08:07 PM schrieb Michael Schachtebeck:
> /sbin/iptables -t nat -I PREROUTING -p tcp -s $IP -i $LAN_DEV --sport
> 1024: --dport 80 --syn -m limit --limit 1/d --limit-burst 1 -j REDIRECT
> --to-port 5000
>
> At first, I thought everything was fine: I got redirected when trying to
> open the first page in my browser, and after that, I could surf normally
> without being redirect. But after about 30 minutes, I got redirected
> again, and iptables -t nat -vnL PREROUTING said that the rule had
> matched twice.
As I could not test the rules that Jan has suggested in his answer to my
postings (it's a production machine and I couldn't reboot it with a
patched kernel so far), I did some more testing and discovered a very
strange behaviour which I believe to be indeed a bug:
- I added the above rule to the firewall, got redirected exactly once,
and could surf the web for about 40 minutes without being redirected
again.
- A cron job deleted some rules from the PREROUTING chain and added
some new rules to the PREROUTING chain.
- I got redirected again (exactly once), directly after the cron job had
modified the PREROUTING chain.
- I could surf the web for exactly 60 minutes without being redirected
again.
- The cron job ran again.
- I got redirected again (exactly once), directly after the cron job had
modified the PREROUTING chain.
- I ran the cron job manually.
- I got redirected again (exactly once) and could surf the web normally
after that.
- I ran the cron job manually again.
- I got redirected again (exactly once).
- ... (I repeated it some times, same result)
- I could surf the web for about one hour without being redirected,
until... you guess it, until the cron job ran again and modified the
PREROUTING chain.
The cron job did not touch the rule above I am using to do the
redirection, it only deleted some other rules in the PREROUTING chain
and added some new rules to the PREROUTING chain.
So this seems to be a bug in the kernel's iptables implementation, right?
I'm using a 2.6.12.2 vanilla kernel and iptables 1.2.11 (gentoo package
net-firewall/iptables-1.2.11-r3).
Cheers,
Michael.
--
PGP Public Key: http://www.num.math.uni-goettingen.de/schachte/key.asc
Key fingerprint: C474 8B85 17C0 0232 E439 0FBF 2451 E452 293C D798
next prev parent reply other threads:[~2005-07-20 14:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 18:07 limit extension Michael Schachtebeck
2005-07-19 20:13 ` Jan Engelhardt
2005-07-19 21:01 ` Michael Schachtebeck
2005-07-20 6:25 ` Jan Engelhardt
2005-07-20 14:15 ` Michael Schachtebeck [this message]
2005-07-20 14:45 ` Sven Schuster
2005-07-20 14:55 ` Michael Schachtebeck
2005-07-20 15:15 ` Sven Schuster
2005-07-20 14:58 ` Sven Schuster
2005-07-20 15:01 ` Sven Schuster
2005-07-20 15:03 ` Michael Schachtebeck
2005-07-20 15:05 ` Jan Engelhardt
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=42DE5C90.70603@rbw.goe.net \
--to=schachti@rbw.goe.net \
--cc=netfilter@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.