tech:dynamic_dns_ddns_avec_dhcp
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:dynamic_dns_ddns_avec_dhcp [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:dynamic_dns_ddns_avec_dhcp [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes Dynamic DNS DDNS avec DHCP | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | ## Hack DHCP ne veux pas faire du DDNS sous RedHat 8 | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | #! /bin/bash | ||
| + | |||
| + | NAME_FQDN=" | ||
| + | IP=$(hostname -I | tr " " " | ||
| + | #IP=$(ip a | grep wlan0 | grep "inet " | awk ' | ||
| + | |||
| + | if [ ! -z " | ||
| + | then | ||
| + | nsupdate -k / | ||
| + | update del ${NAME_FQDN} A | ||
| + | update add ${NAME_FQDN} 86400 A ${IP} | ||
| + | send | ||
| + | EOF | ||
| + | fi | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | chmod +x / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Ce hack n'est pas nécessaire | ||
| + | |||
| + | Il faut avoir le paquet isc-dhcp-client d' | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | send host-name = gethostname(); | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Exemple nsupdate | ||
| + | |||
| + | ~~~bash | ||
| + | nsupdate -k / | ||
| + | update del plop.acme.local A | ||
| + | update add plop.acme.local 86400 A 192.168.1.4 | ||
| + | show | ||
| + | send | ||
| + | EOF | ||
| + | ~~~ | ||
| + | |||
| + | ## Autres | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | Vérif syntax | ||
| + | ~~~bash | ||
| + | dhcpd -t -cf / | ||
| + | ~~~ | ||
| + | |||
| + | Rafraichir la conf | ||
| + | ~~~bash | ||
| + | > / | ||
| + | systemctl restart dhcpd | ||
| + | ~~~ | ||
| + | |||
