No Description

ohnonot 68bcc395e4 do not use opennic resolv.conf, build our own 3 weeks ago
LICENSE 0c3fb3434d update email address 1 year ago
PKGBUILD.alt 250c816bd9 do not use opennic resolv.conf, build our own 3 weeks ago
README.md e9dca747c9 Update README.md 4 months ago
default_ns.patch 656ad926b9 add that patch the README.md was promising 2 years ago
opennic.service f39eea20b7 fix service file 3 years ago
opennic.sh 68bcc395e4 do not use opennic resolv.conf, build our own 3 weeks ago
opennic_timed.service f68c86c8d8 do not use opennic resolv.conf, build our own 3 weeks ago
opennic_timed.timer 0993699177 alternative systemd integration with timer 4 months ago

README.md

opennic DNS resolving

Service to grab the nearest dns service from OpenNIC. Using the fixed ip, the three nearest opennic servers, as listed by the API will be written to /etc/resolv.conf.

If the OpenNIC lookup fails, it's possible to replace the error message with a default DNS lookup address, as in this patch.

Please note that DHCP clients like dhcpcd tend to have mechanisms in place to update /etc/resolv.conf. As opennic relies on an IP to be resolved over the net, the changes made to said file would be overwritten by opennic.

Installation

Archlinux

Grab the PKGBUILD from the AUR.

systemd

The PKGBUILD would install the systemd service file opennic.service to the systemd directory /usr/lib/systemd/system. For custom service files, the recommended path is /etc/systemd/system.

The opennic_timed pair of service & timer will execute the script once per day instead of during system initialization. If you have trouble with opennic.service, try this instead: copy both opennic_timed.* files to /etc/systemd/system, edit the timer unit to your desires, and enable it with systemctl enable opennic_timed.timer.

Other init systems

Install the opennic.sh in /usr/local/bin (or /usr/bin) and make the boot scripts run the script on boot after connecting to the network.

LICENSE

Copyright (c) 2015-2016, mar77i

This software may be modified and distributed under the terms of the ISC license. See the LICENSE file for details.