From 5365eb116e9755cdbfc450c29a97306bf52618c0 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 17 May 2017 01:07:06 +0200 Subject: [PATCH] prepare ipv6-tunnel with he.net for upstream2 --- salt-pillar/upstream/upstream2.sls | 5 +++++ salt/top.sls | 1 + salt/upstream/ipv6-tunnel.conf | 7 +++++++ salt/upstream/ipv6-tunnel.sls | 15 +++++++++++++++ subnets.md | 10 ++++++++++ 5 files changed, 38 insertions(+) create mode 100644 salt/upstream/ipv6-tunnel.conf create mode 100644 salt/upstream/ipv6-tunnel.sls diff --git a/salt-pillar/upstream/upstream2.sls b/salt-pillar/upstream/upstream2.sls index ed00f99..761130c 100644 --- a/salt-pillar/upstream/upstream2.sls +++ b/salt-pillar/upstream/upstream2.sls @@ -9,3 +9,8 @@ port-forwarding: - proto: udp port: 1194 to: 172.20.75.9:1194 + +ipv6-tunnel: + endpoint: 216.66.80.30 + address: 2001:470:1f0a:12b2::2 + gateway: 2001:470:1f0a:12b2::1 diff --git a/salt/top.sls b/salt/top.sls index db915e1..4edc570 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -38,6 +38,7 @@ base: - collectd 'upstream2': - upstream.port-forwarding + - upstream.ipv6-tunnel 'anon*': - no-ssh - forwarding diff --git a/salt/upstream/ipv6-tunnel.conf b/salt/upstream/ipv6-tunnel.conf new file mode 100644 index 000000000..552d264 --- /dev/null +++ b/salt/upstream/ipv6-tunnel.conf @@ -0,0 +1,7 @@ +auto ipv6 +iface ipv6 inet6 v4tunnel + address {{ address }} + netmask 64 + endpoint {{ endpoint }} + ttl 255 + gateway {{ gateway }} diff --git a/salt/upstream/ipv6-tunnel.sls b/salt/upstream/ipv6-tunnel.sls new file mode 100644 index 000000000..48d1341 --- /dev/null +++ b/salt/upstream/ipv6-tunnel.sls @@ -0,0 +1,15 @@ +/etc/network/interfaces.d/ipv6-tunnel.conf: + file.managed: + - source: salt://upstream/ipv6-tunnel.conf + - template: 'jinja' + - context: + endpoint: {{ pillar['ipv6-tunnel'].get('endpoint') }} + address: {{ pillar['ipv6-tunnel'].get('address') }} + gateway: {{ pillar['ipv6-tunnel'].get('gateway') }} + - require: + - pkg: ifupdown + +'ifdown ipv6; ifup ipv6': + cmd.run: + - onchanges: + - file: /etc/network/interfaces.d/ipv6-tunnel.conf diff --git a/subnets.md b/subnets.md index 0291b9d..7010ec9 100644 --- a/subnets.md +++ b/subnets.md @@ -57,3 +57,13 @@ Machine-readable here: [salt-pillar/subnets](./salt-pillar/subnets/init.sls) * fd23:42:c3d2:5cd::/64 PRIV14 * fd23:42:c3d2:5ce::/64 PRIV15 * fd23:42:c3d2:5cf::/64 PRIV16 + +## Tunnelbroker.net + +* 2001:470:1f0b:12b1::/64 +* 2001:470:77fb::/48 + +# Peer C3D2: + +* 172.22.99.0/24 +* 2001:470:6d:670::/64