Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriansev/dyndns_home
Home made dyndns service based on dnsmasq and curl
https://github.com/adriansev/dyndns_home
dnsmasq dnsmasq-restarter dyndns dyndns-service
Last synced: about 4 hours ago
JSON representation
Home made dyndns service based on dnsmasq and curl
- Host: GitHub
- URL: https://github.com/adriansev/dyndns_home
- Owner: adriansev
- Created: 2018-04-16T10:16:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-23T14:06:51.000Z (almost 4 years ago)
- Last Synced: 2024-12-19T20:39:49.871Z (14 days ago)
- Topics: dnsmasq, dnsmasq-restarter, dyndns, dyndns-service
- Language: Shell
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dyndns_home
Home made dyndns service based on dnsmasq (resolver), php/httpd (registering server) and curl (registering client)You don't have control over DHCP and/or dns and want your vms to be accesible by name?
Want to skip the hurdle of associating MACs with ips in DHCP or similar hurdles for the random MACs of vms?
Just use a local dns resolver (that can also do caching) in a minimal cpu/memory print1. Configure dnsmasq
1.1 Have in dnsmasq config the following :
Have /etc/resolv_dnsmasq.conf contain a local resolver (optional) and some global ones (8.8.8.8) :
resolv-file=/etc/resolv_dnsmasq.conf
strict-order # parse /etc/resolv.conf in order
conf-dir=/etc/dnsmasq.d # parse declarations in this director. !!! N.B.!!! to be writeable by http (see step 3) make it root:apache 7751.2 have in /etc/resolv.conf :
nameserver 127.0.0.1one could add other backup nameservers (in case the local dnsmasq is not running)
2. Make sure dnsmasq is restarted each time content of /etc/dnsmasq.d is modified - only for systemd
copy dnsmasq_restarter.path and dnsmasq_restarter.service in /etc/systemd/system
systemctl enable --now dnsmasq_restarter.path dnsmasq_restarter.service3. Serve by a php enabled server the contents of www_html_dnsmasq :
a php that writes a pair of name/ip in /etc/dnsmasq.d (the regex should validate the hostname)
and an necessary .htacess (no one wants headaches - the included one have format for apache 2.4)4. Because is possible to have my network configuration mechanisms (ifcfg-, NetworkManager, systemd-networkd)
the most common way to register the ip would be through crond
so just put regip in /root/bin and see regip_install for creating the /etc/cron.d/regip fileif vm/kickstarted machine have multiple ips, curl have the option "--interface" that takes either an interface name or an ip.