2018-03-03 19:01:05 +01:00
|
|
|
Introduction
|
|
|
|
------------
|
|
|
|
|
|
|
|
dyndomain permet de contourner les limitations de votre abonnement Orange et
|
|
|
|
de sa Livebox en utilisant un nom de domaine chez OVH:
|
|
|
|
- bien que "relativement" stable, les adresses IPv4 (et IPv6) de votre Livebox
|
|
|
|
changent de temps en temps.
|
|
|
|
- les comptes de type dyndns supportés par la Livebox 4 ne supportent que
|
|
|
|
l'IPv4, sont contraignant à utiliser, et parfois payants.
|
|
|
|
- La Livebox 4 ne supporte pas les comptes dyndns OVH.
|
|
|
|
- et OVH ne supporte que l'IPv4 pour ses comptes dyndns
|
|
|
|
|
|
|
|
dyndomain surveille votre Livebox toutes les minutes récupère ses adresses
|
|
|
|
IPv4 et IPv6 ainsi que les adresses IPv6 des machines dans votre reseau
|
|
|
|
local.
|
|
|
|
Lors d'un changement, la zone dns de votre domaine chez OVH est mise à jour.
|
|
|
|
|
|
|
|
Ainsi si vous avez le domaine chezmoi.fr chez OVH, vous pourrez retrouver
|
|
|
|
les machines de votre reseau:
|
|
|
|
|
|
|
|
* la livebox elle-même:
|
|
|
|
|
|
|
|
$ host livebox.home.chezmoi.fr
|
|
|
|
livebox.home.chezmoi.fr has address 1.2.3.4
|
|
|
|
livebox.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:aaaa:aaaa:aaaa:aaaa
|
|
|
|
|
|
|
|
* une machine visible en IPv6:
|
|
|
|
|
|
|
|
$ host machine1.home.chezmoi.fr
|
|
|
|
machine1.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:bbbb:bbbb:bbbb:bbbb
|
|
|
|
|
|
|
|
* une machine avec une redirection IPv4:
|
|
|
|
|
|
|
|
$ host machine2.home.chezmoi.fr
|
|
|
|
machine2.home.chezmoi.fr has address 1.2.3.4
|
|
|
|
machine2.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:cccc:cccc:cccc:cccc
|
|
|
|
|
|
|
|
Les enregistrements DNS sont configurés avec un TTL de 60s, donc un changement
|
|
|
|
d'adresse est au pire visible en 2 minutes (parfois plus, si vous utilisez des
|
|
|
|
serveurs qui forcent des mises en cache avec des durées minimales supérieures).
|
|
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
$ git clone $URL
|
|
|
|
$ cd dyndomain
|
|
|
|
|
|
|
|
$ git submodule init sysbus
|
|
|
|
$ git submodule update sysbus
|
|
|
|
|
|
|
|
$ git submodule init ovh
|
|
|
|
$ git submodule update ovh
|
|
|
|
|
|
|
|
|
|
|
|
Setup - Livebox
|
|
|
|
---------------
|
|
|
|
|
|
|
|
$ ./sysbus/sysbus.py -password LIVEBOXADMINPASSWORD -config
|
|
|
|
url = http://livebox.home/
|
|
|
|
user = admin
|
|
|
|
password = LIVEBOXADMINPASSWORD
|
|
|
|
model = lb4
|
|
|
|
|
|
|
|
check that configuration is correct:
|
|
|
|
$ ./sysbus/sysbus.py
|
|
|
|
SoftwareVersion : XG40_sip-fr-3.2.18.1_7.21.3.1
|
|
|
|
UpTime : 2 days, 10:10:12 (NumberOfReboots: 21)
|
|
|
|
ExternalIPAddress : n.n.n.n
|
|
|
|
IPv4Address : 192.168.1.1
|
|
|
|
IPv6Address : nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn
|
|
|
|
IPv6DelegatedPrefix : nnnn:nnnn:nnnn:nnnn::/56
|
|
|
|
IPv6Address : nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn:nnnn
|
|
|
|
directoryNumber : +339xxxxxxxx
|
|
|
|
|
|
|
|
|
|
|
|
Setup - OVH
|
|
|
|
-----------
|
|
|
|
|
|
|
|
I assume you already have:
|
|
|
|
- an OVH account NN1234-OVH
|
|
|
|
- a domain handled by OVH
|
|
|
|
|
|
|
|
* create ovh.conf file:
|
|
|
|
|
|
|
|
$ cp ovh-sample.conf ovh.conf
|
|
|
|
|
|
|
|
* Create Application Token:
|
|
|
|
|
|
|
|
visit https://eu.api.ovh.com/createApp/
|
|
|
|
fill fields:
|
|
|
|
- account id: your ovh account
|
|
|
|
- password
|
|
|
|
- Application Name: dyndomain or whatever you want
|
|
|
|
- Application Description: whatever you want
|
|
|
|
write down application key and application secret into ovh.conf file
|
|
|
|
|
|
|
|
* Create Consumer Token:
|
|
|
|
|
|
|
|
edit register_ovh_account script with your own domain (in place of example.com)
|
|
|
|
$ ./register_ovh_account
|
|
|
|
visit printed url and authenticate yourself with your OVH account
|
|
|
|
write down consumer key into ovh.conf file
|
|
|
|
|
|
|
|
|
|
|
|
Setup - Home configuration
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
* create home.conf file:
|
|
|
|
|
|
|
|
$ cp home-sample.conf home.conf
|
|
|
|
|
|
|
|
* setup [zone]:
|
|
|
|
|
|
|
|
domain: your own domain
|
|
|
|
subdomain: whatever your want, typically home:
|
|
|
|
all hosts will be something like mypc1.home.domain.ext
|
|
|
|
|
|
|
|
* setup [Hosts]:
|
|
|
|
|
|
|
|
list here all machines you want to add in your domain with an IPv6 record
|
|
|
|
|
|
|
|
* setup [NatHosts]:
|
|
|
|
|
|
|
|
list here all machines you want to add in your domain with the WAN IPv4 record
|
|
|
|
In order to be useful you need to have an IPv4 redirection rule in your livebox
|
|
|
|
for these hosts
|
|
|
|
|
|
|
|
* setup [Mail]:
|
|
|
|
|
|
|
|
all updates will be sent to this mail address
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
* test everything is correct:
|
|
|
|
|
|
|
|
$ ./dyndomain
|
|
|
|
|
|
|
|
* setup a crontab entry to launch it every minute
|
|
|
|
|
|
|
|
|
|
|
|
|