How to add extra 5 ipv6 addresses to my xubuntu and register them with dyndns?
My xubuntu 14.10 have automatically configured ipv4 and ipv6 addresses:
sam@minisrv1:~$ ip -6 addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:470:**:***:94ef:b2f6:70bb:1674/64 scope global temporary dynamic
valid_lft 600084sec preferred_lft 81084sec
inet6 2001:470:**:***:222:4dff:fea1:389f/64 scope global mngtmpaddr dynamic
valid_lft 4294096507sec preferred_lft 4294096507sec
inet6 fe80::222:4dff:fea1:389f/64 scope link
valid_lft forever preferred_lft forever
Perfect!!!
Now I want to add extra 5 ipv6 addresses and make them registered wiht dyndns. What is RIGHT way to do it?
I checked /etc/network/interfaces and /etc/NetworkManager/NetworkManager.conf config files, but them say nothing about eth0:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
and
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
The folder /etc/NetworkManager/system-connections/ is empty too.
Also I tryied GUI tools "Network Connections" and "Editing Wired Connection 1". But i don't know what to write to Prefix, Gateway and other fields. They all comes from router.
And finally, I have no idea where to put my dyndns update scripts
curl "http://dyn.dns.he.net/nic/update?hostname=***&password=***&myip=???" > /dev/null
Update:
I found temporrary solution, thanks to this
I created /etc/NetworkManager/dispatcher.d/74-sam-ipv6.sh file, with following content:
#!/bin/bash
IF=$1
STATUS=$2
if [ "$IF" == "eth0" ]
then
case "$2" in
up)
logger -s "74-sam-ipv6.sh eth0 up"
ip -6 addr add 2001:470::::0/64 dev eth0
ip -6 addr add 2001:470::::1/64 dev eth0
ip -6 addr add 2001:470::::2/64 dev eth0
ip -6 addr add 2001:470::::3/64 dev eth0
ip -6 addr add 2001:470::::*4/64 dev eth0
curl "http://dyn.dns.he.net/nic/update?hostname=a.***my-domain***.ru&password=***&myip=2001:470:**:***::*0" > /dev/null
curl "http://dyn.dns.he.net/nic/update?hostname=b.***my-domain***.ru&password=***&myip=2001:470:**:***::*1" > /dev/null
curl "http://dyn.dns.he.net/nic/update?hostname=c.***my-domain***.ru&password=***&myip=2001:470:**:***::*3" > /dev/null
curl "http://dyn.dns.he.net/nic/update?hostname=d.***my-domain***.ru&password=***&myip=2001:470:**:***::*2" > /dev/null
curl "http://dyn.dns.he.net/nic/update?hostname=e.***my-domain***.ru&password=***&myip=2001:470:**:***::*4" > /dev/null
echo ok
;;
down)
logger -s "74-sam-ipv6.sh eth0 down"
ip -6 addr del 2001:470:**:***::*0/64 dev eth0
ip -6 addr del 2001:470:**:***::*1/64 dev eth0
ip -6 addr del 2001:470:**:***::*2/64 dev eth0
ip -6 addr del 2001:470:**:***::*3/64 dev eth0
ip -6 addr del 2001:470:**:***::*4/64 dev eth0
echo ok
;;
pre-up)
logger -s "74-sam-ipv6.sh"
;;
post-down)
logger -s "74-sam-ipv6.sh"
;;
*)
logger -s "74-sam-ipv6.sh ------unknown-commmand-------------------------------------> $2"
;;
esac
fi