--- a/README Thu Feb 26 15:05:18 2015 +0200
+++ b/README Thu Feb 26 15:09:16 2015 +0200
@@ -42,6 +42,23 @@
fixed-address 127.0.0.2;
}
+=== Host aliases ===
+Hosts can specify DNS aliases:
+
+ [foo]
+ ip = 127.0.0.1
+ alias = test1
+
+ [bar]
+ ip = 127.0.0.2
+ alias = test2
+
+ $ bin/pvl.hosts-forward --forward-zone alias.test etc/hosts/alias.test
+ foo A 127.0.0.1
+ test1 CNAME foo
+ bar A 127.0.0.2
+ test2 CNAME bar
+
=== Generated hosts ===
The hosts file format supports something similar to bind9's $GENERATE directive for hosts:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/alias.test Thu Feb 26 15:09:16 2015 +0200
@@ -0,0 +1,7 @@
+[foo]
+ ip = 127.0.0.1
+ alias = test
+
+[bar]
+ ip = 127.0.0.2
+ alias = test