2022-11-15 18:26:26 +00:00
|
|
|
bootstrapDns:
|
|
|
|
ips:
|
|
|
|
- 1.1.1.1
|
|
|
|
- 1.0.0.1
|
|
|
|
|
2022-02-28 20:07:34 +00:00
|
|
|
upstream:
|
|
|
|
default:
|
|
|
|
- 1.1.1.1
|
|
|
|
- 1.0.0.1
|
2022-06-23 20:34:08 +00:00
|
|
|
quad9:
|
|
|
|
- 9.9.9.9
|
|
|
|
- 149.112.112.112
|
|
|
|
- 2620:fe::fe
|
|
|
|
- 2620:fe::9
|
|
|
|
- https://dns.quad9.net/dns-query
|
2022-06-24 03:11:09 +00:00
|
|
|
- tcp-tls:dns.quad9.net
|
2022-06-23 20:34:08 +00:00
|
|
|
quad9-unsecured:
|
|
|
|
- 9.9.9.10
|
|
|
|
- 149.112.112.10
|
|
|
|
- 2620:fe::10
|
|
|
|
- 2620:fe::fe:10
|
|
|
|
- https://dns10.quad9.net/dns-query
|
|
|
|
- tcp-tls:dns10.quad9.net
|
2022-03-14 22:56:06 +00:00
|
|
|
|
2022-07-28 05:04:46 +00:00
|
|
|
conditional:
|
2022-11-15 18:26:26 +00:00
|
|
|
fallbackUpstream: false
|
2022-07-28 05:04:46 +00:00
|
|
|
mapping:
|
2022-11-21 00:24:00 +00:00
|
|
|
# TODO: Run a simple dns server that this can forward to where it's hosts are set by nomad-services
|
|
|
|
# consul: {{ env "attr.unique.network.ip-address" }}:8600
|
2022-07-28 05:04:46 +00:00
|
|
|
home.arpa: 192.168.2.1
|
|
|
|
in-addr.arpa: 192.168.2.1
|
|
|
|
iot: 192.168.2.1
|
|
|
|
local: 192.168.2.1
|
|
|
|
thefij: 192.168.2.1
|
|
|
|
.: 192.168.2.1
|
|
|
|
|
2022-11-15 18:26:26 +00:00
|
|
|
clientLookup:
|
|
|
|
upstream: 192.168.2.1
|
|
|
|
|
2022-02-28 20:07:34 +00:00
|
|
|
blocking:
|
|
|
|
blackLists:
|
|
|
|
ads:
|
|
|
|
- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
|
2022-03-22 03:12:47 +00:00
|
|
|
- http://sysctl.org/cameleon/hosts
|
|
|
|
- https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
|
|
|
|
- https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
|
|
|
|
- https://hosts-file.net/ad_servers.txt
|
|
|
|
smarttv:
|
|
|
|
- https://perflyst.github.io/PiHoleBlocklist/SmartTV.txt
|
|
|
|
- https://perflyst.github.io/PiHoleBlocklist/regex.list
|
|
|
|
malware:
|
|
|
|
- https://mirror1.malwaredomains.com/files/justdomains
|
2022-12-22 23:13:31 +00:00
|
|
|
antisocial:
|
|
|
|
- |
|
|
|
|
facebook.com
|
|
|
|
instagram.com
|
|
|
|
reddit.com
|
|
|
|
twitter.com
|
|
|
|
youtube.com
|
|
|
|
|
2022-06-23 20:36:06 +00:00
|
|
|
whiteLists:
|
|
|
|
# Move to Gitea when deployed internally
|
|
|
|
ads:
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ with nomadVar "nomad/jobs/blocky" -}}
|
|
|
|
{{ .whitelists_ads | indent 6 }}
|
|
|
|
{{- end }}
|
2022-02-28 20:07:34 +00:00
|
|
|
clientGroupsBlock:
|
|
|
|
default:
|
|
|
|
- ads
|
2022-03-22 03:12:47 +00:00
|
|
|
- malware
|
2022-05-18 21:22:35 +00:00
|
|
|
- smarttv
|
2022-12-22 23:13:31 +00:00
|
|
|
192.168.10.232:
|
|
|
|
- ads
|
|
|
|
- malware
|
|
|
|
- antisocial
|
2022-02-28 20:07:34 +00:00
|
|
|
|
|
|
|
customDNS:
|
|
|
|
customTTL: 1h
|
|
|
|
mapping:
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ with nomadService "traefik" -}}
|
2022-05-19 23:53:56 +00:00
|
|
|
{{- $last := len . | subtract 1 -}}
|
|
|
|
{{- $services := . -}}
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ with nomadVar "nomad/jobs" }}{{ .base_hostname }}{{ end }}: {{ range $i := loop $last -}}
|
2022-05-19 23:53:56 +00:00
|
|
|
{{- with index $services $i }}{{ .Address }},{{ end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- with index . $last }}{{ .Address }}{{ end -}}
|
2022-11-21 00:24:00 +00:00
|
|
|
{{- end }}
|
2022-06-23 16:51:09 +00:00
|
|
|
# Other mappings
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ with nomadVar "nomad/jobs/blocky" }}{{ .mappings | indent 4 }}{{ end }}
|
2022-02-28 20:07:34 +00:00
|
|
|
|
2022-03-14 22:56:06 +00:00
|
|
|
prometheus:
|
|
|
|
enable: true
|
|
|
|
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ range nomadService 1 (env "NOMAD_ALLOC_ID") "redis" -}}
|
2022-03-14 22:56:06 +00:00
|
|
|
redis:
|
2022-11-21 00:24:00 +00:00
|
|
|
address: {{ .Address }}:{{ .Port }}
|
2022-06-23 16:51:09 +00:00
|
|
|
# password: ""
|
|
|
|
# database: 0
|
2022-05-19 23:54:16 +00:00
|
|
|
connectionAttempts: 10
|
|
|
|
connectionCooldown: 3s
|
2022-11-12 00:21:17 +00:00
|
|
|
{{ end -}}
|
2022-03-14 22:56:06 +00:00
|
|
|
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ $mysql_addr := "" }}
|
|
|
|
{{ with nomadService 1 (env "NOMAD_ALLOC_ID") "mysql-server" -}}{{ range . -}}
|
|
|
|
{{ $mysql_addr = print .Address ":" .Port }}
|
|
|
|
{{- end }}{{- end }}
|
|
|
|
{{ with nomadVar "nomad/jobs/blocky" -}}
|
2022-11-12 00:21:17 +00:00
|
|
|
queryLog:
|
|
|
|
type: mysql
|
2022-11-21 00:24:00 +00:00
|
|
|
target: {{ .db_user }}:{{ .db_pass }}@tcp({{ $mysql_addr }})/{{ .db_name }}?charset=utf8mb4&parseTime=True&loc=Local
|
2022-11-12 00:21:17 +00:00
|
|
|
logRetentionDays: 14
|
2023-02-27 19:52:25 +00:00
|
|
|
{{ end -}}
|
2022-03-14 22:56:06 +00:00
|
|
|
|
2022-02-28 20:07:34 +00:00
|
|
|
port: 53
|
|
|
|
httpPort: 4000
|