From: /dev/rob0 <rob0@gmx.co.uk>
To: netfilter <netfilter@lists.netfilter.org>
Subject: OUTPUT filtering (was: Re: Ip_conntrack_ftp ...)
Date: Wed, 13 Jul 2005 09:45:50 -0500 [thread overview]
Message-ID: <42D5291E.7090308@gmx.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.61.0507131212090.14635@yvahk01.tjqt.qr>
Jan Engelhardt wrote:
>>Hmm, many people, including myself, think, that filtering in OUTPUT is
>>pointless. More troublesome than usefull. If you decide to set OUTPUT
>>policy to ACCEPT, you don't need the first two rules. Up to you.
>
> Not at all. Because certains things can not happen in certain environments,
> e.g. I read/write mail by logging into a mail server via SSH / no sendmail
> running, I can exclude certain things. In netfilter parlance:
>
> -P OUTPUT ACCEPT (same for FORWARD, btw)
> -A OUTPUT -j REJECT -p tcp --dport 25
>
> This stops users that also have access to my machine to not spam smtp servers,
> should they find an open one.
(Be sure you also restrict access to any sendmail(1)-style mail
injection binary in that case, if there's an MTA running.)
True, you have illustrated one example of sane OUTPUT filtering. The
OP's use of OUTPUT filtering was not in this category.
Note that OUTPUT filtering only controls non-root users. A root user can
disable or bypass it. If you have local shell users who cannot be
trusted, and if you didn't already understand all this, chances are
those users already have rooted you. :)
I agree with Joerg above. I don't think you have contradicted his
general point. Netfilters should:
1. Learn to walk before they try to run
Rule of thumb: if you need to post here to try to get explanations
of what your rules are doing, you're not ready for OUTPUT filters.
2. Only experiment with carefully-crafted OUTPUT rules
3. Generally not attempt "iptables -P OUTPUT DROP" (see #1.)
--
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: header
next prev parent reply other threads:[~2005-07-13 14:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 9:05 Ip_conntrack_ftp with PASSIVE FTP does not work Chandra.Vempali
2005-07-13 9:38 ` Jörg Harmuth
2005-07-13 10:14 ` Jan Engelhardt
2005-07-13 14:45 ` /dev/rob0 [this message]
2005-07-14 12:20 ` OUTPUT filtering Amin Azez
2005-07-14 15:56 ` Jörg Harmuth
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=42D5291E.7090308@gmx.co.uk \
--to=rob0@gmx.co.uk \
--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