thanks for your reply. For any odd reason I wasn’t even thinking about doing this with a DNS query. But having fetch loading content into variable could still be a handy thing.
If anybody wants to run a self-service for this, it can be easily done with dnsdist from PowerDNS with a few lines of lua:
-- spoof responses in Lua
function spoofMyIP(dq)
if(dq.qtype==1)
then
return DNSAction.Spoof, dq.remoteaddr:toString()
else
return DNSAction.None, ""
end
end
addLuaAction("myip.mydomain.de.", spoofMyIP)