All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Vehent <julien@linuxwall.info>
To: Yang Zhang <yanghatespam@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Process filtering
Date: Mon, 14 Sep 2009 22:00:31 +0200	[thread overview]
Message-ID: <4AAEA0DF.3080301@linuxwall.info> (raw)
In-Reply-To: <9066fa250909141238o6a81ef53s90b3f79e76ed4a7b@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

Hello,

Yang Zhang wrote:
> Hi, is it possible to filter (local origin/destination) packets on
> process or application? My understanding is that iptables doesn't do
> this, but are there any other system facilities in Linux that make
> this possible? Thanks in advance.

The owner module (xt_owner) matches the owner of the socket

# iptables -m owner --help
iptables v1.4.4
[...]
owner match options:
[!] --uid-owner userid[-userid]      Match local UID
[!] --gid-owner groupid[-groupid]    Match local GID
[!] --socket-exists                  Match if socket exists


man iptables for more details ;)

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3485 bytes --]

      reply	other threads:[~2009-09-14 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 19:38 Process filtering Yang Zhang
2009-09-14 20:00 ` Julien Vehent [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=4AAEA0DF.3080301@linuxwall.info \
    --to=julien@linuxwall.info \
    --cc=netfilter@vger.kernel.org \
    --cc=yanghatespam@gmail.com \
    /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.