[bind] Wildcard DNS record 본문
[bind] Wildcard DNS record변군 변군이글루 2018.05.25 12:23
Wildcard DNS record
Set Up WildCard DNS
If you have a dedicated IP address, you can create a wildcard A record by setting the Host Name value to an * (asterisk).
When you do so, if the subdomain queried does not exist, the server will respond with the IP address specified in the Zone File Editor as the wildcard.
For example, if someone were to visit http://wildcard.mytestdomain.com, and the subdomain "wildcard" does not exist anywhere on the account, the visitor is redirected to the IP address you specified for the wildcard.
# cat sangchul.kr.zone
@ IN SOA ns.sangchul.kr. rname.sangchul.kr. (
60 ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.sangchul.kr.
IN A 192.168.0.251
ns1 IN A 192.168.0.251
* IN A 127.0.0.1
# named-checkzone sangchul.kr sangchul.kr.zone
zone sangchul.kr/IN: loaded serial 2018052502
# dig @127.0.0.1 ns1.sangchul.kr +short
# dig @127.0.0.1 aaa.sangchul.kr +short