NetFilter
[Top] [All Lists]

Re: ip6tables problem

To: netfilter@lists.netfilter.org
Subject: Re: ip6tables problem
From: "Asfand Yar Qazi" <ayqazi@gmail.com>
Date: Wed, 20 Dec 2006 20:33:30 +0000
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b3EKbzy/N85zr//+8QdvIpKA6MAwD7yJglJMhToLUq2zrYK8/mqjnbeEIpiDEw5+ddfZuYHkyeobBK5FEQsWMMh6an/v7RSFQ6IaoWY/J4n/LqFKvTOFYtEj9zw8XndMPPeNFK2fCYV75Fz4+JeA3qEu9OH4zcdFl5TE9IVMWZ8=
In-reply-to: <79328ea80612200837q45d7bbd5y1723904880f6d90@mail.gmail.com>
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
References: <79328ea80612191634s1ffbb494ge96c56c771a05d66@mail.gmail.com> <slrneoifta.ln3.xpisar@album.ics.muni.cz> <79328ea80612200756i538b3f4fp38192730a8518fc5@mail.gmail.com> <slrneoinkj.miu.xpisar@album.ics.muni.cz> <79328ea80612200837q45d7bbd5y1723904880f6d90@mail.gmail.com>
Sender: netfilter-bounces@lists.netfilter.org
On 12/20/06, Asfand Yar Qazi <ayqazi@gmail.com> wrote:
On 12/20/06, Petr Pisar <xpisar@fi.muni.cz> wrote:
> On 2006-12-20, Asfand Yar Qazi <ayqazi@gmail.com> wrote:
> > On 12/20/06, Petr Pisar <xpisar@fi.muni.cz> wrote:
> >> On 2006-12-20, Asfand Yar Qazi <ayqazi@gmail.com> wrote:
> >> > I have an ipv6 tunnel on the device 'tunbt6', and another interface on
> >> > eth0 to the rest of my network.
> >> >
> >> > When I enter the following commands:
> >> >
> >> > ip6tables -N filter6
> >> > ip6tables -A filter6 -m state --state NEW -i ! tunbt6 -j ACCEPT
> >> > ip6tables -A filter6 -m state --state ESTABLISHED,RELATED -j ACCEPT
> >> > ip6tables -A filter6 -j REJECT
> >> >
> >> > ip6tables -A INPUT -j filter6
> >> > ip6tables -A FORWARD -j filter6
> >> >
> >> >
> >> > It doesn't work!  I can't even ping6 the machine over eth0 from my
> >> > other computer connected to the same ethernet segment!
> >> >
> >>
> >> IP6 uses ICMP6 for link level address resolution (like IP4 uses ARP).
> >> Therefore you need to accept NEW icmp6 packets. At least some types.
> >> Read draft-ietf-v6ops-icmpv6-filtering-bcp-01.txt (can be found on IETF
> >> FTP server) for more detailes.
> >>
> >
> > I'll just let in all icmp6 packets.  Now to figure out how to do that...
> >
> ip6tables -I filter6 -p icmpv6 -j ACCEPT
>

Yep, figured that out, thanks :-)


Argh - still no luck.  I can now ping6 remote destinations, but I
can't, for example, establish ssh connections.  I can't even ssh to
another local box over eth0!

To summarise, here's where it stands:

ip6tables -N filter6
ip6tables -A filter6 -p icmpv6 -j ACCEPT
ip6tables -A filter6 -m state --state NEW -i ! tunbt6 -j ACCEPT
ip6tables -A filter6 -m state --state ESTABLISHED,RELATED -j ACCEPT
ip6tables -A filter6 -j REJECT

ip6tables -A INPUT -j filter6
ip6tables -A FORWARD -j filter6

To force it to let me ssh around to and from my router box, I am
forced to do this:
ip6tables -N filter6
ip6tables -A filter6 -i eth0 -j ACCEPT
ip6tables -A filter6 -i lo -j ACCEPT
ip6tables -A filter6 -p icmpv6 -j ACCEPT
ip6tables -A filter6 -m state --state NEW -i ! tunbt6 -j ACCEPT
ip6tables -A filter6 -m state --state ESTABLISHED,RELATED -j ACCEPT
ip6tables -A filter6 -j REJECT

ip6tables -A INPUT -j filter6
ip6tables -A FORWARD -j filter6

Anybody know what's happening?


<Prev in Thread] Current Thread [Next in Thread>