cache-domains/scripts/README.md
Amir Zarrinkafsh 9ea56243de
Simplify Dnsmasq script
[Dnsmasq version >= 2.86](https://thekelleys.org.uk/dnsmasq/CHANGELOG) supports passing multiple IP addresses via the `address=` syntax now.

>Major rewrite of the DNS server and domain handling code. The change makes multiple addresses associated with a domain work address=/example.com/1.2.3.4 address=/example.com/5.6.7.8.

This allows us to simplify the script and the `.hosts` file workaround is no longer necessary.
2021-09-12 10:15:11 +10:00

1.2 KiB
Executable file

DNS Generation Scripts

Introduction

The respective shell scripts contained within this directory can be utilised to generate application specific compliant configuration which can be utilised with:

  • Dnsmasq
  • Unbound

Usage

  1. Copy config.example.json to config.json.
  2. Modify config.json to include your Cacheserver's IP(s) and the CDNs you plan to cache. The following example assumes a single shared Cacheserver IP:
{
  "ips": {
    "generic":	["10.10.10.200"]
  },
  "cache_domains": {
    "blizzard":     "generic",
    "epicgames":    "generic",
    "nintendo":     "generic",
    "origin":       "generic",
    "riot":         "generic",
    "sony":         "generic",
    "steam":        "generic",
    "uplay":        "generic",
    "wsus":         "generic"
  }
}
  1. Run generation script relative to your DNS implementation: bash create-dnsmasq.sh.
  2. Copy files from output/{dnsmasq,unbound}/* to the respective locations for Dnsmasq/Unbound.
  3. Restart Dnsmasq or Unbound.

Notes for Dnsmasq users

This also applies to users utilising the script alongside Pi-hole.

Multi-IP Lancache setups are only supported with Dnsmasq or Pi-hole versions >= 2.86 or 2021.09 respectively.