I like having the 'predictable' IPv6 add ... / 2011-06-10

2011-06-10 I like having the 'predictable' IPv6 add ... 8 years ago
I like having the 'predictable' IPv6 address for my laptop at home, but at the same time I was pondering the implications of having the same EIU-64 address everywhere. Which can be fixed by enabling the privacy extensions.

As I use wicd for connection management I had a look at Adding pre and post (dis)connection scripts - Wicd Wiki which showed clear options. The easiest way to 'recognize' my home networks is by assigned v6 range. So I created /etc/wicd/scripts/postconnect/ipv6privacychoice with:
#!/bin/bash

connection_type="$1"

if [ "${connection_type}" == "wired" ]; then
        v6prefix=`rdisc6 eth0 -q -1`
        if [ "${v6prefix}" = "2001:980:14ca:1::/64" ]; then
                sysctl net.ipv6.conf.eth0.use_tempaddr=0
        else
                sysctl net.ipv6.conf.eth0.use_tempaddr=2
        fi
elif [ "${connection_type}" == "wireless" ]; then
        v6prefix=`rdisc6 wlan0 -q -1`
        if [ "${v6prefix}" == "2001:980:14ca:2::/64" ]; then
                sysctl net.ipv6.conf.wlan0.use_tempaddr=0
        else
                sysctl net.ipv6.conf.wlan0.use_tempaddr=2
        fi
else
        echo "Unknown connection type: ${connection_type}"
        exit
fi

Tags: , , ,

, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
RSS
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated in 0.004732 seconds.