xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Konieczny <jajcus@jajcus.net>
To: Sylvain Munaut <s.munaut@whatever-company.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic
Date: Fri, 16 May 2014 20:13:55 +0200	[thread overview]
Message-ID: <53765563.1030604@jajcus.net> (raw)
In-Reply-To: <1400081005-23895-5-git-send-email-s.munaut@whatever-company.com>

On 2014-05-14 17:23, Sylvain Munaut wrote:
> This adds the same functions for ip6tables as the one for iptables.
> The 'ip' variable can now contain ipv6s for the domain and add
> appropriate rules
> 
>  - If the 'ip' var is empty then both full IPv4 and IPv6 are allowed.
>  - If only IPv4 ips are present, then IPv6 will be completely disallowed.
>  - If only IPv6 ips are present, then IPv4 will be completely disallowed.
>  - You can use ::0/0 or 0.0.0.0/0 to allow v6 or v4 globally but filter
>    the other one.
> 
> This gracefully handles if the dom0 doesn't have IPv6. If
> the call to ip6tables doesn't succeed, it just ignores any
> IPv6 stuff.

I think it would be a good idea to allow autoconfigured IPv6 addresses.
These have the lower 64-bit of the address set to a value based on the
interface MAC address (EUI-64), which is known in the vif script.

Unfortunately it is not easy to compute that suffix in a shell script.
In my setup I use a helper Python script, but guess this might not be
the perfect solution for the standard scripts.

> +  # Always allow ICMP messages from link-local addresses (for ND)
> +  ip6tables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in "$dev" \
> +    -s fe80::/64 -j ACCEPT 2>/dev/null &&

I wonder if checking this addresses against the MAC address may be
desirable, especially when bridging. This would be assured by the same
rule as the other auto-configured addresses.

Greets,
	Jacek

  parent reply	other threads:[~2014-05-16 18:13 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 15:23 Improvement to linux/hotplug scripts Sylvain Munaut
2014-05-14 15:23 ` [PATCH 1/5] hotplug/linux: Fix the vif script to handle_iptable for tap interfaces Sylvain Munaut
2014-05-14 17:08   ` Roger Pau Monné
2014-05-15 15:53     ` Ian Campbell
2014-05-16  8:53       ` Sylvain Munaut
2014-05-14 15:23 ` [PATCH 2/5] hotplug/linux: Add an option to disable acceleration on VIF Sylvain Munaut
2014-05-15 15:57   ` Ian Campbell
2014-05-20  7:55     ` Sylvain Munaut
2014-05-20  9:10       ` Ian Campbell
2014-05-14 15:23 ` [PATCH 3/5] hotplug/linux: Improve iptables logic Sylvain Munaut
2014-05-15 16:15   ` Ian Campbell
2014-05-20  8:02     ` Sylvain Munaut
2014-05-20  9:17       ` Ian Campbell
2014-05-20 11:23         ` Sylvain Munaut
2014-05-20 11:28           ` Ian Campbell
2014-05-14 15:23 ` [PATCH 4/5] hotplug/linux: Add IPv6 support to the " Sylvain Munaut
2014-05-15 16:19   ` Ian Campbell
2014-05-15 16:23     ` Ian Campbell
2014-05-20 11:58     ` Sylvain Munaut
2014-05-20 12:24       ` Ian Campbell
2014-05-20 13:11         ` Sylvain Munaut
2014-05-20 13:54           ` Ian Campbell
2014-05-20 12:32       ` configuring vif options to be consumed by hotplug scripts (Was: Re: [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic) Ian Campbell
2014-05-16 18:13   ` Jacek Konieczny [this message]
2014-05-16 19:33     ` [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic Sylvain Munaut
2014-05-16 19:47       ` Jacek Konieczny
2014-05-14 15:23 ` [PATCH 5/5] hotplug/linux: Add IPv6 support to vif-route Sylvain Munaut
2014-05-15 16:20   ` Ian Campbell
2014-05-16 19:17     ` Jason Andryuk
2014-05-16 19:19       ` Sylvain Munaut
2014-05-20  8:06     ` Sylvain Munaut
2014-05-20  9:20       ` Ian Campbell
2014-05-20 11:17         ` Sylvain Munaut
2014-05-20 11:27           ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2017-01-24 16:49 [PATCH 0/5] Various improvements for the VIF linux hotplug scripts Sylvain Munaut
2017-01-24 16:49 ` [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic Sylvain Munaut
2017-01-24 17:43   ` Ian Jackson

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=53765563.1030604@jajcus.net \
    --to=jajcus@jajcus.net \
    --cc=s.munaut@whatever-company.com \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).