Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer  <christoph.anton.mitterer@physik.uni-muenchen.de>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter <netfilter@vger.kernel.org>
Subject: Re: dropping UNTRACKED packets, breaks IPv6 - why?
Date: Fri, 26 Jul 2013 22:20:39 +0200	[thread overview]
Message-ID: <1374870039.5456.9.camel@fermat.scientia.net> (raw)
In-Reply-To: <CAOkSjBggVWoGj-Kin3fwDx+1pjpHyB2MSxna86-X7ik90iSeQA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

Hi.

On Fri, 2013-07-26 at 09:07 +0200, Arturo Borrero Gonzalez wrote:
> Could you provide a ip6tables-save format ruleset?
see attachment...


> What is the default policy? I guess you are not allowing ICMP messages
> in OUTPUT. ICMP messages are important in IPv6.
No I do...

It's as if ICMP was UNTRACKED.

Just removing either
-A INPUT -m state --state UNTRACKED -j DROP
or
-A OUTPUT -m state --state UNTRACKED -j DROP
alone isn't enough... I really need to remove both (for the first time).

Cheers,
Chris.

[-- Attachment #2: rules.v6 --]
[-- Type: text/x-iptables, Size: 1367 bytes --]

*filter




:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]




-A INPUT	--in-interface lo	-j ACCEPT
-A OUTPUT	--out-interface lo	-j ACCEPT

-A INPUT	-m state  --state UNTRACKED	-j DROP
-A FORWARD	-m state  --state UNTRACKED	-j DROP
-A OUTPUT	-m state  --state UNTRACKED	-j DROP

-A INPUT	-m state  --state INVALID	-j DROP
-A FORWARD	-m state  --state INVALID	-j DROP
-A OUTPUT	-m state  --state INVALID	-j DROP

#handle IPsec only sources/destinations
-A INPUT	--protocol udp  -m multiport  --destination-ports isakmp,isakmp-nat_espinudp	-j ACCEPT
-A OUTPUT	--protocol udp  -m multiport  --destination-ports isakmp,isakmp-nat_espinudp	-j ACCEPT
-N ipsec-only-in
-N ipsec-only-out

-A INPUT	-m state  --state ESTABLISHED,RELATED	-j ACCEPT

-A INPUT	--protocol icmpv6	-j ACCEPT




#do not handle packets that were or are going to be IPsec processed
-A ipsec-only-in	-m policy  --strict --dir in --pol ipsec --mode tunnel --proto esp	-j RETURN
-A ipsec-only-out	-m policy  --strict --dir out --pol ipsec --mode tunnel --proto esp	-j RETURN
#deny all non-ESP packets (packets that are not subject to IPsec)
-A ipsec-only-in	! --protocol esp	-j REJECT  --reject-with icmp6-adm-prohibited
-A ipsec-only-out	! --protocol esp	-j REJECT  --reject-with icmp6-adm-prohibited



# other stuff...


-A INPUT	-j REJECT  --reject-with icmp6-port-unreachable




COMMIT

  reply	other threads:[~2013-07-26 20:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  1:59 dropping UNTRACKED packets, breaks IPv6 - why? Christoph Anton Mitterer
2013-07-26  7:07 ` Arturo Borrero Gonzalez
2013-07-26 20:20   ` Christoph Anton Mitterer [this message]
2013-07-27 19:49 ` Pascal Hambourg
2013-07-27 20:53   ` Christoph Anton Mitterer
2013-07-28  7:51     ` Pascal Hambourg

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=1374870039.5456.9.camel@fermat.scientia.net \
    --to=christoph.anton.mitterer@physik.uni-muenchen.de \
    --cc=arturo.borrero.glez@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox