From nobody Tue Mar 29 20:57:32 2022 X-Original-To: freebsd-pf@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 24D001A3DD8D for ; Tue, 29 Mar 2022 20:57:33 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [IPv6:2607:f3e0:0:1::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smarthost1.sentex.ca", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KShhr4Mmxz3Nnc for ; Tue, 29 Mar 2022 20:57:32 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene2a.sentex.ca (pyroxene19.sentex.ca [199.212.134.19]) by smarthost1.sentex.ca (8.16.1/8.16.1) with ESMTPS id 22TKvWVU026120 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 Mar 2022 16:57:32 -0400 (EDT) (envelope-from mike@sentex.net) Received: from [IPV6:2607:f3e0:0:4:cd39:a1da:92e4:3394] ([IPv6:2607:f3e0:0:4:cd39:a1da:92e4:3394]) by pyroxene2a.sentex.ca (8.16.1/8.15.2) with ESMTPS id 22TKvVXn004989 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 29 Mar 2022 16:57:32 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <0b67d668-2f0c-fcfc-f180-97eba208bcad@sentex.net> Date: Tue, 29 Mar 2022 16:57:32 -0400 List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: PF session ttl Content-Language: en-US To: Cristian Cardoso Cc: FreeBSD PF List References: <558dfec2-031a-feb6-dc2f-f9fc83205896@sentex.net> From: mike tancsa In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 X-Rspamd-Queue-Id: 4KShhr4Mmxz3Nnc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:1::12 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-2.93 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sentex.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.53)[-0.533]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-pf]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[199.212.134.19:received] X-ThisMailContainsUnwantedMimeParts: N On 3/29/2022 4:51 PM, Cristian Cardoso wrote: > Thanks for the command. But actually I wanted to know if there is a > "default" value, what is its value and if it is configurable. > pfctl -sa will show you the current defaults I think what you are after is in the pf.conf's man page under STATEFUL TRACKING OPTIONS                Changes the timeout values used for states created by this rule.            For a list of all valid timeout names, see OPTIONS above. with the example            pass in proto tcp from any to any \                  port www keep state \                  (max 100, source-track rule, max-src-nodes 75, \                  max-src-states 3, tcp.established 60, tcp.closing 5) and you can set global defaults via the set timeout command.     ---Mike > Em ter., 29 de mar. de 2022 às 17:48, mike tancsa > escreveu: > > On 3/29/2022 4:30 PM, Cristian Cardoso wrote: > > Hi > > Guys, does anyone happen to know how to tell me the value of > session > > ttl that PF uses to terminate sessions that are via statefull? > > Are you looking for when a state expires ? If so, try > > pfctl -ss -v -v > > it will show you when it expires > > e.g > > all tcp 192.168.96.1:22 > (10.159.159.249:24 ) <- > 192.168.1.89:64660 > SYN_SENT:ESTABLISHED >     [997609076 + 2097152] wscale 6  [2771445293 + 16777472] wscale 2 >     age 00:00:00, expires in 00:00:30, 1:1 pkts, 52:52 bytes >     id: 90d5c76500000000 creatorid: 7b2b3e4b gateway: 0.0.0.0 >     origif: vlan9 > >      ---Mike >