Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: John Ratliff <jratliff@bluemarble.net>
Cc: netfilter@vger.kernel.org
Subject: Re: nf_conntrack_max
Date: Mon, 5 Sep 2016 11:33:04 +0200	[thread overview]
Message-ID: <20160905093304.GB2469@salvia> (raw)
In-Reply-To: <000001d20613$933e88e0$b9bb9aa0$@bluemarble.net>

On Sat, Sep 03, 2016 at 02:47:08PM -0400, John Ratliff wrote:
> I have been able to raise the conntrack limits and the hashsize, but I don't
> know how to get a udp timeout policy yet. I'm using Debian 8 Jessie with
> nfct 1.42.
> 
> $ nfct timeout add dns-udp inet udp established 15 close 1 close_wait 1
> nfct v1.4.2: Wrong state name: `ESTABLISHED' for protocol `udp'

UDP has two states, replied and unreplied, so this is:

 # nfct add timeout dns-udp inet udp replied 15 unreplied 1

For TCP, states are:

        syn_sent
        syn_recv
        established
        fin_wait
        close_wait
        last_ack
        time_wait
        close
        syn_sent2
        retrans
        unacknowledged

When the generic tracker is in place, you use "timeout", eg.

 # nfct add timeout generic-timeout-policy inet generic timeout 15

For SCTP, states are:

        closed
        cookie_wait
        cookie_eched
        established
        shutdown_sent
        shutdown_recd
        shutdown_ack_sent

For DCCP, states are:

        request
        respond
        partopen
        open
        closereq
        closing
        timewait

For ICMP/v6, there is only one, so you use "timeout".

That's it. If anyone gets some spare cycles, I'd appreciate if you can
contribute a patch to update the manpage so this information is
available there.

You can use this to create your custom timeout policies. You can also
set global default timeouts via nfct:

 # nfct default-set timeout inet tcp established 15

instead of using sysctl, just an alternative.

Thanks!

  reply	other threads:[~2016-09-05  9:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 22:15 nf_conntrack_max John Ratliff
2016-08-31 22:47 ` nf_conntrack_max /dev/rob0
2016-09-01 10:59   ` nf_conntrack_max Pablo Neira Ayuso
2016-09-01 15:18     ` nf_conntrack_max zrm
2016-09-01 17:05     ` nf_conntrack_max /dev/rob0
2016-09-02 15:05       ` nf_conntrack_max John Ratliff
2016-09-03 18:47         ` nf_conntrack_max John Ratliff
2016-09-05  9:33           ` Pablo Neira Ayuso [this message]
2016-09-05 13:28             ` nf_conntrack_max /dev/rob0
2016-09-02  6:27 ` nf_conntrack_max André Paulsberg-Csibi (IBM Consultant)
2016-09-02 14:47   ` nf_conntrack_max zrm
2016-09-05  8:40     ` nf_conntrack_max André Paulsberg-Csibi (IBM Consultant)
2016-09-05 16:21       ` nf_conntrack_max zrm

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=20160905093304.GB2469@salvia \
    --to=pablo@netfilter.org \
    --cc=jratliff@bluemarble.net \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox