All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Beverley <andy@andybev.com>
To: lartc@vger.kernel.org
Subject: Re: Ingress qdisc via fwmark
Date: Tue, 12 Nov 2013 18:31:58 +0000	[thread overview]
Message-ID: <1384281118.11368.32.camel@andylaptop> (raw)
In-Reply-To: <1384266540.24209.41.camel@Desktop>

On Tue, 2013-11-12 at 14:29 +0000, Chris Elston wrote:
> Hello,
> 
> I'm having a little trouble getting ingress policing working, filtering
> based on an iptables fwmark.

As you allude to, this is not possible with a vanilla kernel (unless
it's changed recently).

> Also, this diagram suggests that queueing to the ingress qdisc happens
> before classification takes place:
> http://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg

Yes, the ingress qdisc will see the packets before they have hit
netfilter.

> I'm hoping that someone on the list can let me know whether this is
> actually possible with contemporary kernels, and if so, where I'm going
> wrong.

The only options I know of are:

1. Use IMQ (not in the vanilla kernel).

2. If you're forwarding packets, then use an egress qdisc on the output
interface.

3. If you want to DROP packets, then you might be able to do so once the
client sends reply packets, and therefore catch them using egress on
their way back out.

4. Use a U32 filter on ingress. You may find the discussion here useful:

http://www.spinics.net/lists/lartc/msg22354.html

Andy



  parent reply	other threads:[~2013-11-12 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 14:29 Ingress qdisc via fwmark Chris Elston
2013-11-12 17:23 ` Chris Elston
2013-11-12 18:31 ` Andrew Beverley [this message]
2013-11-27 17:31 ` Chris Elston
2013-11-27 17:39 ` Andrew Beverley

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=1384281118.11368.32.camel@andylaptop \
    --to=andy@andybev.com \
    --cc=lartc@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 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.