update README

This commit is contained in:
Gilles Grandou 2018-03-04 19:29:32 +01:00
parent 139dad2b86
commit 7d9300df18

109
README
View File

@ -20,20 +20,20 @@ les machines de votre reseau:
* la livebox elle-même: * la livebox elle-même:
$ host livebox.home.chezmoi.fr $ host livebox.home.chezmoi.fr
livebox.home.chezmoi.fr has address 1.2.3.4 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 livebox.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:aaaa:aaaa:aaaa:aaaa
* une machine visible en IPv6: * une machine visible en IPv6:
$ host machine1.home.chezmoi.fr $ host machine1.home.chezmoi.fr
machine1.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:bbbb:bbbb:bbbb:bbbb machine1.home.chezmoi.fr has IPv6 address pppp:pppp:pppp:pppp:bbbb:bbbb:bbbb:bbbb
* une machine avec une redirection IPv4: * une machine avec une redirection IPv4:
$ host machine2.home.chezmoi.fr $ host machine2.home.chezmoi.fr
machine2.home.chezmoi.fr has address 1.2.3.4 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 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 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 d'adresse est au pire visible en 2 minutes (parfois plus, si vous utilisez des
@ -43,7 +43,7 @@ serveurs qui forcent des mises en cache avec des durées minimales supérieures)
Installation Installation
------------ ------------
$ git clone $URL $ git clone https://framagit.org/ggrandou/dyndomain.git
$ cd dyndomain $ cd dyndomain
$ git submodule init sysbus $ git submodule init sysbus
@ -62,7 +62,7 @@ $ ./sysbus/sysbus.py -password LIVEBOXADMINPASSWORD -config
password = LIVEBOXADMINPASSWORD password = LIVEBOXADMINPASSWORD
model = lb4 model = lb4
check that configuration is correct: Verifier que la configuration est correcte:
$ ./sysbus/sysbus.py $ ./sysbus/sysbus.py
SoftwareVersion : XG40_sip-fr-3.2.18.1_7.21.3.1 SoftwareVersion : XG40_sip-fr-3.2.18.1_7.21.3.1
UpTime : 2 days, 10:10:12 (NumberOfReboots: 21) UpTime : 2 days, 10:10:12 (NumberOfReboots: 21)
@ -77,68 +77,79 @@ $ ./sysbus/sysbus.py
Setup - OVH Setup - OVH
----------- -----------
I assume you already have: Il vous faut:
- an OVH account NN1234-OVH - un compte chez OVH (nic-handle de la forme NN1234-OVH)
- a domain handled by OVH - un domaine herbergé chez OVH
* create ovh.conf file: * Création du fichier ovh.conf:
$ cp ovh-sample.conf ovh.conf $ cp ovh-sample.conf ovh.conf
* Create Application Token: * Création de l'Application Token:
visit https://eu.api.ovh.com/createApp/ visitez la page https://eu.api.ovh.com/createApp/
fill fields: remplir les champs:
- account id: your ovh account - account id: votre compte OVH
- password - password
- Application Name: dyndomain or whatever you want - Application Name: dyndomain ou ce que vous voulez
- Application Description: whatever you want - Application Description: ce que vous voulez
write down application key and application secret into ovh.conf file remplissez les champs Application Key et Application Secret dans le
fichier ovh.conf
* Create Consumer Token: * Création du Consumer Token:
edit register_ovh_account script with your own domain (in place of example.com) Editez le fichier register_ovh_account avec votre propre domaine
$ ./register_ovh_account (à la place de example.com)
visit printed url and authenticate yourself with your OVH account $ ./register_ovh_account
write down consumer key into ovh.conf file Visitez l'URL affichée et authentifiez-vous avec votre compte OVH.
Enregistrer la Consumer Key dans le fichier ovh.conf
Setup - Home configuration Setup - Réseau local
-------------------------- --------------------
* create home.conf file: * Création du fichier home.conf:
$ cp home-sample.conf home.conf $ cp home-sample.conf home.conf
* setup [zone]: * configuration [zone]:
domain: your own domain domain: votre propre domaine
subdomain: whatever your want, typically home: subdomain: ce que vous voulez, typiquement "home"
all hosts will be something like mypc1.home.domain.ext
* setup [Hosts]: Toutes les machines seront nommées avec un nom du type
mypc1.home.domain.ext
list here all machines you want to add in your domain with an IPv6 record * configuration [Hosts]:
* setup [NatHosts]: Listez ici toutes les machines auquelles vous voulez ajouter un
enregistrement IPv6.
list here all machines you want to add in your domain with the WAN IPv4 record * configuration [NatHosts]:
In order to be useful you need to have an IPv4 redirection rule in your livebox
for these hosts
* setup [Mail]: Listez ici toutes les machines auquelles vous voulez ajouter un
enregistrement IPv4.
Comme l'adresse IPv4 est l'adresse WAN (de la livebox), pour que
ce soit utile, il faut que vous ayez ajourter une règle de redirection
pour ces machines sur votre interface Livebox
all updates will be sent to this mail address * configuration [Mail]:
Chaque mise à jour génerera un mail qui sera envoyé à cette adresse.
Usage Utilisation
----- -----------
* test everything is correct: * Pour tester que tout est correct:
$ ./dyndomain $ ./dyndomain
* setup a crontab entry to launch it every minute la zone dns doit être mise à jour pour votre domaines avec les machines
enregistrées, et vous devrier recevoir un mail notifiant la mise à jour.
* Vous pouvez alors appeler ce script toutes les minutes avec une entrée
crontab.