All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Lister <john.lister@kickstone.com>
To: Dennison Williams <dennison.williams@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: MARK not working
Date: Fri, 02 Apr 2010 08:24:26 +0100	[thread overview]
Message-ID: <4BB59BAA.9080607@kickstone.com> (raw)
In-Reply-To: <4BB53BEC.9010709@gmail.com>



Dennison Williams wrote:
> iptables -t mangle -A PREROUTING -i eth1 -p udp --dport 4500 -j MARK
> --set-mark 1
> iptables -t filter -A INPUT -m mark --mark 1 -j LOG --log-prefix ipsec_nat_t
> iptables -t filter -A INPUT -m mark --mark 1 -j ACCEPT
> iptables -t filter -A INPUT -j LOG
> iptables -t filter -A INPUT -j REJECT
>   
In general make sure that you are saving the marks to the conntrack 
tables  and restoring them with
-j CONNTRACK --save-mark
and
-j CONNTRACK --restore-mark

although in your sample this doesn't matter as you tag every incoming 
packet and as the other post notes, you seem to accept the connections 
before your logging.

I usually only set the mark when the state is NEW

John

      parent reply	other threads:[~2010-04-02  7:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  0:35 MARK not working Dennison Williams
2010-04-02  4:57 ` Marek Kierdelewicz
2010-04-02  7:27   ` Dennison Williams
2010-04-02  9:16     ` Marek Kierdelewicz
2010-04-02 11:30     ` Jan Engelhardt
     [not found]       ` <006a01cad270$b1876110$14962330$@toure@vipnet.ci>
2010-04-02 14:37         ` setting quotas with quota Jan Engelhardt
2010-04-02 20:35       ` MARK not working Dennison Williams
2010-04-02 11:26   ` Jan Engelhardt
2010-04-02 13:02     ` Marek Kierdelewicz
2010-04-02  7:24 ` John Lister [this message]

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=4BB59BAA.9080607@kickstone.com \
    --to=john.lister@kickstone.com \
    --cc=dennison.williams@gmail.com \
    --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 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.