* Use a SixXS tunnel.
svn path=/configurations/trunk/tud/; revision=26400
Eelco Dolstra committed
Mar 17, 2011 at 16:42 UTC
e4e01fd0d65abde49aee644eb47d31b832bd1093
1 file changed
+17
-20
cartman.nix
+17
-20
@@ -100,26 +100,23 @@ rec {
100
# lucifer ssh (to give Karl/Armijn access for the BAT project)
101
#iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 22222 -j DNAT --to 192.168.1.25:22
102
103
- # Set up a 6to4 tunnel for IPv6 connectivity.
104
-
105
- # cleanup
106
- ip -6 route flush dev tun6to4
107
- ip link set dev tun6to4 down
108
- ip tunnel del tun6to4
109
-
110
- # compute 6to4 address
111
- prefix6=$(printf "2002:%02x%02x:%02x%02x\n" $(echo ${myIP} | tr . ' '))
112
- addr6="$prefix6"::0 # our tunnel end-point on the tun6to4 interface
103
+ # Cleanup.
104
+ ip -6 route flush dev sixxs
105
+ ip link set dev sixxs down
106
+ ip tunnel del sixxs
107
+
108
+ # Set up a SixXS tunnel for IPv7 connectivity.
109
+ ip tunnel add sixxs mode sit local 130.161.158.181 remote 192.87.102.107 ttl 64
110
+ ip link set dev sixxs mtu 1280 up
111
+ ip -6 addr add 2001:610:600:88d::2/64 dev sixxs
112
+ ip -6 route add default via 2001:610:600:88d::1 dev sixxs
113
+
114
+ # Discard all traffic to networks in our prefix that don't exist.
115
+ ip -6 route add 2001:610:685::/48 dev lo
116
114
- # set up the tunnel
115
- ip tunnel add tun6to4 mode sit remote any local ${myIP} ttl 64
116
- ip link set dev tun6to4 mtu 1472 up
117
- ip -6 addr add $addr6/128 dev tun6to4
118
- ip -6 route add default via ::192.88.99.1 dev tun6to4 metric 1
119
-
120
- # enable forwarding for the rest of the network
121
- ip -6 addr add $prefix6::1/64 dev eth0
122
- ip -6 route add $prefix6::/64 dev eth0
117
+ # Create a local network (prefix:1::/64).
118
+ ip -6 addr add 2001:610:685:1::1/64 dev eth0
119
+ ip -6 route add 2001:610:685:1::/64 dev eth0
120
'';
121
};
122
@@ -131,7 +128,7 @@ rec {
128
''
129
interface eth0 {
130
AdvSendAdvert on;
134
- prefix 2002:82a1:9eb5::/64 { };
131
+ prefix 2001:610:685:1::/64 { };
132
};
133
'';
134
};