All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Peter Bieringer <pb@bieringer.de>
Cc: Maillist netdev <netdev@oss.sgi.com>,
	Netfilter development mailing list
	<netfilter-devel@lists.netfilter.org>,
	USAGI core <usagi-core@linux-ipv6.org>,
	Harald Welte <laforge@gnumonks.org>
Subject: Re: ip6tables: accept of IPv6 transport esp packages not possible - no rule matches
Date: Sun, 02 Jan 2005 12:42:54 +0100	[thread overview]
Message-ID: <41D7DE3E.2090304@trash.net> (raw)
In-Reply-To: <85346B5DA83795C08812E782@worker.muc.bieringer.de>

Peter Bieringer wrote:
>>Does this patch fix the problem ?
>>
> Yes, this patch fix the problem on the incoming side:

Thanks.

> 
> I ping6 to a remote host via IPsec in transport mode:
> 
> IPv6 INPUT chain:
> 
>     0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0
> ipv6-icmp type 128
>     0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0
> ipv6-icmp type 129
>     1   156 ACCEPT     esp      *      *       remote/128  local/128
>     0     0 ACCEPT     all      *      *       remote/128  local/128
> 
> 
> So the proper chain matches.
> 
> 
> But I wonder a little bit because of the result of the OUTPUT chain:
> 
>     0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0
> ipv6-icmp type 129
>     1   104 ACCEPT     icmpv6    *      *       ::/0                 ::/0
> ipv6-icmp type 128
>     0     0 ACCEPT     esp      *      *       local/128  remote/128
>     0     0 ACCEPT     all      *      *       local/128  remote/128
> 
> 
> Here, the ICMPv6 rule matches.
> 
> This means for me that the traffic goes like this:
> 
> OUTPUT: ping6 -> netfilter -> encryption -> ESP
> INPUT : ESP -> netfilter -> decryption -> ping6

More specific, with transport mode it goes:

OUTPUT: ping6 -> LOCAL_OUT -> encryption -> POST_ROUTING
INPUT: ESP -> PRE_ROUTING -> LOCAL_IN -> decryption -> ping6

Filtering for IPv6 happens on LOCAL_IN/LOCAL_OUT (and FORWARD).

> Is this logical?

Not very. Patches to improve this for IPv4 will be submitted
next week, but IPv6 still needs some work.

> 
> BTW: how to filter incoming traffic after decryption?

Use tunnel-mode. The decrypted packets will hit PRE_ROUTING
and LOCAL_IN again.

Regards
Patrick

  reply	other threads:[~2005-01-02 11:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-24  9:45 ip6tables: accept of IPv6 transport esp packages not possible - no rule matches Peter Bieringer
2004-12-24 15:59 ` Peter Bieringer
2004-12-25 15:46   ` Patrick McHardy
2005-01-02  9:01     ` Peter Bieringer
2005-01-02 11:42       ` Patrick McHardy [this message]
2005-01-02 12:15         ` Peter Bieringer
2005-01-02 21:14           ` Patrick McHardy

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=41D7DE3E.2090304@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@gnumonks.org \
    --cc=netdev@oss.sgi.com \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pb@bieringer.de \
    --cc=usagi-core@linux-ipv6.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.