From: Nick Taylor <nickt@lightlink.com>
To: Askar Ali Khan <askarali@gmail.com>
Cc: netfilter <netfilter@lists.netfilter.org>
Subject: Re: blocking a site for others not for -m owner
Date: Thu, 8 Jul 2004 01:24:20 -0400 (EDT) [thread overview]
Message-ID: <Pine.GSU.4.58.0407080114300.6360@adore.lightlink.com> (raw)
In-Reply-To: <a0f69e50407072156420fc7aa@mail.gmail.com>
> Now im trying to block a site www.foo.com for users excluding user
> "askar" with something like....
>
> #iptables -A OUTPUT -p tcp --dport 80 -d www.foo.com -j DROP
>
> this works for all users however when I tries to exclude user
> "askar" from this blocking with...
>
> #iptables -A OUTPUT -p tcp --dport 80 -d www.kmmod.com -m owner
> --uid-owner askar -j ACCEPT
>
> site is still block for user "askar", i also tried with
> changing the other of the rules no working :), Howto exclude "askar" ?
>
Well, two things. First, and I assume you know this, in your first
example, you list www.foo.com (216.234.246.149, and 216.234.246.150), and
in the second example you use www.kmmod.com (66.226.86.161). Obviously,
if you want the second rule to contradict the first one, you have to use
the same destination address, but with the setup you give, it still won't
work. When you use -A, you Append to the chain, meaning you place the new
rule at the bottom. The first rule that terminates a chain is the only
one that matters, and a -j DROP is a terminating rule, so the kernel drops
the packet, and forgets about it before it thinks about reading the second
rule. You have two choices, either enter a specific -j ACCEPT rule (like
the -m owner match) before the less specific -j DROP rule, or enter the -j
DROP rule with a -I to insert it at the top of the chain.
Hope this helps
prev parent reply other threads:[~2004-07-08 5:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-08 4:56 blocking a site for others not for -m owner Askar Ali Khan
2004-07-08 5:16 ` Alexander Samad
2004-07-08 5:24 ` Nick Taylor [this message]
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=Pine.GSU.4.58.0407080114300.6360@adore.lightlink.com \
--to=nickt@lightlink.com \
--cc=askarali@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox