From: justin joseph <justin.cok@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Re: bug in iptables
Date: Fri, 15 Feb 2008 12:20:43 +0530 [thread overview]
Message-ID: <47B53643.9000107@gmail.com> (raw)
In-Reply-To: <74d7e2880802141038t53e58f5frafe12a3a77a3fca9@mail.gmail.com>
justin joseph wrote:
> Hi,
> It seems to be there in iptables as well.
To be specific I am able to add a rule thus:
iptables -t mangle -A tcpost -i lan1 -s 192.168.10.10 -o wan1 -p tcp --dport 22 -j CLASSIFY
--set-class 1:11
Relevant "shorewall show mangle" output is:
Chain tcpost (1 references)
pkts bytes target prot opt in out source destination
0 0 CLASSIFY tcp -- lan1 wan1 192.168.10.10 0.0.0.0/0 tcp dpt:22
CLASSIFY set 1:11
0 0 CLASSIFY all -- * wan1 0.0.0.0/0 0.0.0.0/0 MARK match
0x1/0xff CLASSIFY set 1:11
0 0 CLASSIFY all -- * wan1 0.0.0.0/0 0.0.0.0/0 MARK match
0xfe/0xff CLASSIFY set 1:1254
Man iptables says:
-i, --in-interface [!] name
Name of an interface via which a packet was received (only for packets entering the
INPUT, FORWARD and PREROUTING chains). When the "!" argument is used before the interface
name, the sense is inverted. If the interface name ends in a "+", then any interface which
begins with this name will match. If this option is omitted, any interface name will match.
But iptables is taking the -i option in case of POSTROUTING as well. In my case, I were trying to
classify traffic coming from lan1:192.168.10.10 and although this rule was taken it was not being
hit because I understand from what Tom Eastep said, "It is because packets in the Postrouting chain
are not guaranteed to even have an input chain"
-justin
next prev parent reply other threads:[~2008-02-15 6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 18:38 bug in iptables justin joseph
2008-02-15 6:50 ` justin joseph [this message]
2008-02-19 12:28 ` Patrick McHardy
2008-02-22 7:26 ` justin joseph
2008-02-22 14:08 ` Patrick McHardy
2008-02-22 14:47 ` Patrick McHardy
2008-02-27 12:07 ` Patrick McHardy
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=47B53643.9000107@gmail.com \
--to=justin.cok@gmail.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).