All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Weiser <michael@weiser.dinsnail.net>
To: Pascal Hambourg <pascal@plouf.fr.eu.org>
Cc: Robert White <rwhite@pobox.com>, netfilter@vger.kernel.org
Subject: Re: Restrictive FTP egress using conntrack helper
Date: Sun, 12 Feb 2017 13:30:52 +0100	[thread overview]
Message-ID: <20170212123052.GD2935@weiser.dinsnail.net> (raw)
In-Reply-To: <10a85123-67f2-c323-435c-3d006ba692aa@plouf.fr.eu.org>

Hi Pascal,

On Sun, Feb 12, 2017 at 10:14:08AM +0100, Pascal Hambourg wrote:

> What has changed in recent kernels is that by default the helper is no more
> automatically associated to the "master" connection. You must do so
> explicitly with the 'CT' target, or change the default setting with some
> sysctl or module parameter I forgot about.

> I fail to retrieve the information page I had read about this change, but
> this one contains useful information :
> <https://home.regit.org/netfilter-en/secure-use-of-helpers/>

That page cleared it up: The default for
/proc/sys/net/netfilter/nf_conntrack_helper seems to be 0 nowadays,
effectively disabling all conntrack helpers by default. Because of that
I have to explicitly assign the helper to certain kinds of packets I
wish it to inspect. In my case (egress) this needs to be a rule such as:

iptables -A OUTPUT -t raw -p tcp --dport 21 -j CT --helper ftp

With that change my firewall now behaves as expected: The data
connection is considered as RELATED and permitted by the catch-all
--state ESTABLISHED,RELATED -j ACCEPT rule.

As the article states, I shall think about further narrowing that
blanket permission for helper-assisted connections.

What's bugging me is that I still don't see an expectation being
created with conntrack -L expect.
-- 
Thanks!
Michael

  reply	other threads:[~2017-02-12 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 17:14 Restrictive FTP egress using conntrack helper Michael Weiser
2017-02-11 22:13 ` Robert White
2017-02-12  9:14   ` Pascal Hambourg
2017-02-12 12:30     ` Michael Weiser [this message]
2017-02-12 14:19       ` Pablo Neira Ayuso
2017-02-12 15:42         ` Michael Weiser
2017-02-12 11:32   ` Michael Weiser

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=20170212123052.GD2935@weiser.dinsnail.net \
    --to=michael@weiser.dinsnail.net \
    --cc=netfilter@vger.kernel.org \
    --cc=pascal@plouf.fr.eu.org \
    --cc=rwhite@pobox.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.