Subdomains and unrelated front zones
When using Unbound with forward zones, does Unbound accept wildcards to catch subdomains, or should each subdomain be specified as a separate forward zone?
Let's say there is a region
example.com
with subdomains
s0.example.com
s1.example.com
s2.example.com
…..
s255.example.com
then what if any of the following names catch all subdomains?
name: "example.com"
name: ".example.com"
name: "example.com."
name: ".example.com."
name: "*.example.com"
This can be considered very simple, but I searched unbound.net, this site and elsewhere without finding an answer. Thanks for the help.
source to share
Try the following:
local-zone: "example.com." redirect
local-data: "example.com. A 127.0.0.1"
requests for www.example.com and www.foo.example.com are redirected, so users with web browsers cannot access sites with the example.com suffix
source: https://www.freebsd.org/cgi/man. cgi? unbound.conf
You can also redirect the .dev extension (choose any) to 127.0.0.1:
local-zone: "dev." redirect
local-data: "dev. 10800 IN A 127.0.0.1"
this will redirect * .dev to 127.0.0.1, which is useful for web developers working with vhosts for example.
source: http://wtf.cyprio.net/wtf/2014-06-22-unbound-catch-all.html
source to share