From: Marco Gaiarin Date: Mon, 24 Jun 2013 12:43:15 +0000 Subject: connmarks restore and helper match Message-Id: <20130624124315.GI3410@sv.lnf.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org I'm playing with connmarks to match SIP and h323 traffic, and i've loaded the connmark modules. Debian squeeze: tank:~# uname -a Linux tank 2.6.32-5-686 #1 SMP Fri May 10 08:33:48 UTC 2013 i686 GNU/Linux tank:~# iptables -V iptables v1.4.8 I've setup some rule like (on mangle table): -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j CONNMARK --restor= e-mark --nfmask 0xffffffff --ctmask 0xffffffff=20 -A FORWARD -m state --state NEW -m mark --mark 0x0 -j mrk-post-fwd=20 and: -A mrk-post-fwd -m helper --helper "h323" -j MARK --set-xmark 0x1/0xffffff= ff=20 -A mrk-post-fwd -m helper --helper "h323" -j RETURN=20 -A mrk-post-fwd -m helper --helper "sip" -j MARK --set-xmark 0x1/0xfffffff= f=20 -A mrk-post-fwd -m helper --helper "sip" -j RETURN=20 but the counter on that rule remain 0. I suppose it is right, because the rtp traffic come after the session (SIP or h323) was established, and so correctly accounted: so the first rule restore the mark on RTP traffic also. Or i'm missing something, eg the two rules on FORWARD chain work only on TCP and so all the UDP traffic got skipped (and generic-marked on a ''last resort'' rule at the end?). How can i ''debug'' these things? Thanks. --=20 dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.= it/ Polo FVG - Via della Bont=E0, 7 - 33078 - San Vito al Tagliamento= (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842= 797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/chi_siamo/5xmille.php (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)