0
1
I have a server that, besides running a forwarding cache DNS (dnsmasq), is hosting some apache2 virtualhosts. I would like these web services to get themselves resolved to localhost when they are querying for each other. I do not see a way to ask dnsmasq to provide an answer depending on the source IP of the query. Does anybody has an idea on how to approach this issue?
First thing that comes to mind: If you can get one host to exclusively contain the virtualhosts you want to resolve, you can point this host to a separate dnsmasq instance for DNS resolution, and then configure the instance however you like. This sidesteps the "source IP condition", because all requests with the source IPs end up at a different dnsmasq instance. – dirkt – 2019-11-01T08:01:53.923