You are not logged in.
Is there any way to glob addresses in /etc/hosts?
If not, which seems to be the case, is there something else that could achieve a similar effect?
Example:
127.0.0.1 *.localhost # enable subdomains on localhost (with Apache virtual hosts)It's not that tedious to manually add them and I could probably write a script, but it would be useful for other things (127.0.0.1 *.google.*
)
Last edited by Xyne (2010-03-24 09:04:25)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
BIND supports DNS wildcards, which seems to be what you're after.
Just for fun I went through the process of setting this up, and it's not too difficult. I did need to do a bit of research to figure out the syntax for the DNS zones. Fortunately, there are plenty of resources which describe this.
Briefly, the process I went through for wildcard domain resolution:
1) Install bind and invoke named
2) Ensure the nameserver is included in resolv.conf and that the DNS service is in the host DB of /etc/nsswitch.conf
3) Edit /etc/named.conf and the corresponding zone file.
There's an article on debian-administration which focuses on exactly the case you proposed.
Last edited by chpln (2010-03-23 11:04:56)
Offline
Thanks chpln.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline