Is it possible to make CNAME's switch it's data every minute (or possibly even shorter) ?
I'm currently trying to make something that changes my CNAME every minute but i have no idea if this is even possible.
So far i have tried different values for the TTL in the zone file (currently TTL: 60) but it seems that the CNAME doesn't mitigate when i ping from a different computer.
{
"$origin": "example.com.",
"$ttl": 10,
"soa": {
"mname": "NS1.EXAMPLE.COM.",
"rname": "ROOT.EXAMPLE.COM.",
"serial": "{time}",
"refresh": 10,
"retry": 600,
"expire": 604800,
"minimum": 86400
},
"ns": [
{ "host": "NS1.EXAMPLE.COM." },
{ "host": "NS2.EXAMPLE.COM." }
],
"a": [
{ "name": "@", "ip": "myip" },
{ "name": "ns1", "ip": "myip_ns1" },
{ "name": "ns2", "ip": "myip_ns2" }
],
"cname":[
{ "name": "wwww", "alias": "www.google.com." },
{ "name": "test", "alias": "www.bing.com." }
]
}
In the above example (in JSON format for ease of use) i have configured 2 CNAME domains, a NodeJS script will make sure that CNAME's are changed every minute (or given interal). for example, it will change the cname alias of "test" to "yahoo.com" rather than "bing.com".
When i check the zone file after the change, it appears to be valid, however it doesn't take effect on other hosts for a long while (perhaps after 1h or so it will work) meanwhile pinging from a different host
i am using bind9 on an ubuntu machine