netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "U.Mutlu" <for-gmane@mutluit.com>
To: netfilter-devel@vger.kernel.org
Subject: Removing a REDIRECT rule not working
Date: Fri, 19 Dec 2014 12:57:41 +0100	[thread overview]
Message-ID: <m713rl$dau$1@ger.gmane.org> (raw)

I think I found a bug in iptables:

If applying such a rule:

  iptables -t nat -A PREROUTING -p tcp --dport 1234 -j REDIRECT --to-port 5678

then testing it at least once by putting a server-app at port 5678,
and then throwing this rule away by clearing (flushing) alle the tables
doesn't get this rule disappear anymore; it somehow is still active,
because the REDIRection still works even after clearing the tables.

(Haven't checked yet if after a reboot of the system the problem disappears,
but even then this of course wouldn't be a satifactory solution to the problem.)

My system: debian 8 (jessie), iptables from the beforementioned repo, version 
v1.4.21


Another related issue:

The following documentation says that the above rule would be a "transparent 
proxy":
  http://www.tldp.org/HOWTO/TransparentProxy-5.html
But this can't be true, because it's NAT (s.a.); whereas from a
transparent proxy one would expect that the originating IP gets
passed thru to the redirected port, which is not the case here;
only the NATted IP gets passed...


             reply	other threads:[~2014-12-19 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 11:57 U.Mutlu [this message]
2014-12-19 12:50 ` Removing a REDIRECT rule not working U.Mutlu

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='m713rl$dau$1@ger.gmane.org' \
    --to=for-gmane@mutluit.com \
    --cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).