I'd like to be able to set up a host, say "eg
", to be an alias to some server on the internet, say "example.example.com
".
I just need this functionality to be available from my local machine. I'm running dnsmasq on that machine, which is running ubuntu 9.10.
Is there a way to configure dnsmasq or the resolver subsystem (including avahi) to resolve that alias hostname via the actual hostname, so that eg
will resolve to the ip address of example.example.com
?
The dnsmasq manpage says:
I think the "known target" criteria will make it unsuitable for your requirements.
I do know that Unbound does support this feature, though.
In your dnsmasq.conf add this line
expand-hosts
This will allow you to create a name that can be used.
This was not asked but if you want to all devices to use it set up the dhcp options. Just for a guide here is my config.
I am runing this on a Raspberry pi that is also acting as a pi-hole and webserver.
Try this in your /etc/hosts:
Although most entries are in the form
a host-to-host alias should work too.