public inbox for lartc@vger.kernel.org
 help / color / mirror / Atom feed
From: Marco Gaiarin <gaio@sv.lnf.it>
To: lartc@vger.kernel.org
Subject: News in conntracking...
Date: Wed, 08 May 2019 10:26:36 +0000	[thread overview]
Message-ID: <20190508102636.GC3194@sv.lnf.it> (raw)


I've just upgraded some of my systems to debian 'stretch' (kernel 4.9.144-3.1
and iptables 1.6.0+snapshot20161117-6) and got on logs:

	May  7 18:32:48 fouc kernel: [   19.097030] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.

and googling around lead to feel that i'm a bit 'left behind' in my
scripts. ;(
I need to clarify some point... please help me.

a) seems that '-m state --state X' is deprecated, better use '-m conntrack --ctstate X'


b) AFAI've understood, expecially reading:

	https://home.regit.org/netfilter-en/secure-use-of-helpers/

 now the conntrack helpers does not load a predefined set of (implicit)
rules (eg, all traffic to/from TCP/UDP port 5060,5061 is SIP), but you
have to explicitly setup some rule. Good.
But the provided example:
	iptables -A FORWARD -m conntrack --ctstate RELATED -m helper \
		--helper sip -d $ISP_RTP_SERVER -p udp -j ACCEPT

it is a bit unclear to me... this example seems to me like: «match
packet related to some existing traffic, of type SIP».
But, if is a 'related' packet, the conntracking just know that is a SIP
packet! Why add a strict check?

Because the new conntrack really need that? Or for a better security
(eg, to prevent match packet that are related but NOT SIP)?


c) How all that work with marking (mangle table)? Now i do:

	iptables -t mangle -A mrk-post-fwd -m helper --helper sip \
		-j MARK --set-mark 0x1/0xf

 i need also here to do insted '-m conntrack --ctstate RELATED -m helper --helper
sip'?


Thanks.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
      http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

                 reply	other threads:[~2019-05-08 10:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190508102636.GC3194@sv.lnf.it \
    --to=gaio@sv.lnf.it \
    --cc=lartc@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