News for hackers. Stuff that matters.
Re:Issues with upstream DNS provider by rsweeney21 on Tuesday August 23, 2022 @07:54PM (#32573217)
We just deployed a workaround that brought our site back up.

1. Find your DNS Target in heroku. It should end with .herokudns.com

2. Lookup the historical DNS record to get the IP addresses. You can find historical DNS records here: https://securitytrails.com/dns-trails

3. Replace your CNAME record in your DNS provider with A records that point to the IP addresses you just found.

Your site should come back up shortly. We plan to revert back to CNAME records once Heroku gets their DNS issues sorted.

Re:Issues with upstream DNS provider by samcheng on Tuesday August 23, 2022 @08:16PM (#32573398)
Heroku - if you're listening. Please do NOT migrate IPs / load balancers here for a little while. You might also do some work to detect those of us who have bypassed your DNS, and give us some nudges individually to move back to your DNS when the time is right.

You just caused a very painful outage for your entire customer base, and a number of us used this hack to get back online. If you don't recognize this, and cause ANOTHER outage (the third in the past few weeks...) we're going to flee even faster to more stable platforms.

Re:Issues with upstream DNS provider by craigkerstiens on Tuesday August 23, 2022 @08:22PM (#32573451)
Those IPs tend to stay pretty stable and are shared across the fleet. While you should change them back once things are stable, it's reasonably likely these won't change out from under you in a few hrs.
Re:Issues with upstream DNS provider by nightpool on Tuesday August 23, 2022 @08:48PM (#32573645)
Hi all, deleting a root CNAME record and adding a new A record on Cloudflare was too risky for us, with its potential to impact external DNS responses, so we took the following steps instead:

1. Create a new temporary subdomain in the Cloudflare DNS panel, e.g. "temp-heroku-resolve.your-domain.com", with IPs from the responses you get by querying Heroku's upstream provider directly (`dig @1.1.1.1 +trace your-app.herokuapp.com`). Make them unproxied (grey cloud) A records with a 30s TTL.

2. Change your root CNAME to point at "temp-heroku-resolve.your-domain.com"

To undo, just reverse these steps and point your root CNAME back at Heroku.

Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:50PM (#32573654)
This is essentially doing the same thing right? What is the advantage of this method? Less DNS changes?

(not trying to be snarky, trying to understand)

Re:Issues with upstream DNS provider by nightpool on Tuesday August 23, 2022 @08:54PM (#32573690)
The advantage is that you can do the CNAME swap atomically in the Cloudflare interface, instead of deleting a CNAME record and adding a new A record, which would lead to a few seconds when your DNS is entirely removed. Those few seconds may not sound like a lot, but they could be cached by Cloudflare or other external DNS resolvers, trigger "clean-up" functions within Cloudflare to remove resources associated with those domains, etc.

In our case, we have substantial logic running on the edge in Cloudflare Workers, as well as lots of other Cloudflare configuration options, and I don't even want to know what it could potentially do to our zone to remove the root DNS record that everything's tied to.

Re:Issues with upstream DNS provider by bombcar on Tuesday August 23, 2022 @11:01PM (#32574497)
Sounds like cloudflare could add an atomic cname -> a record feature.
Re:Issues with upstream DNS provider by fhte on Wednesday August 24, 2022 @12:30AM (#32575006)
Cloudflare should support RFC 2136 which includes atomic updates and is the standard for DNS updates.
Re:Issues with upstream DNS provider by nightpool on Wednesday August 24, 2022 @02:31PM (#32583767)
Honestly, I think this solution worked better than any dedicated feature could have, since it used the exact same existing codepaths that Cloudflare already had for CNAME flattening. Using CNAME records for self-documentation seems like a better practice anyway. Spending the time building a complicated new feature for such a rare case seems like a bad idea.
Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:58PM (#32573729)
Good points, thanks!
Re:Issues with upstream DNS provider by xofer on Tuesday August 23, 2022 @09:41PM (#32574036)
Deleting a record causes requests for that record to be negatively cached. The negative cache TTL[1] is often set to 1 day. So, deleting and immediately recreating a record can take your site offline for days. (Source: I made this mistake when changing a Route53 record for a subdomain that was getting about 70Krps. Luckily it was our source code making the requests, so we could change it, but that took an hours or so to roll out.)

[1]: https://www.rfc-editor.org/rfc/rfc2308

Re:Issues with upstream DNS provider by anayar on Tuesday August 23, 2022 @08:54PM (#32573687)
Nah bc you're not swapping from CNAME > A records, which could have other random networking related impacts, especially if you're running a public API.
Re:Issues with upstream DNS provider by dogweather on Tuesday August 23, 2022 @08:34PM (#32573542)
Nice. We got our test site online by migrating just the dyno to render.com. (And connecting back to Heroku for the database.) We might just switch our DNS there and call it a permanent move.
Re:Issues with upstream DNS provider by csjh on Tuesday August 23, 2022 @10:25PM (#32574283)
probably worth staying at render considering how many issues heroku's had recently
Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:07PM (#32573338)
Anybody know what the risks are for doing this? We have not one but 13 heroku domains running where we might do this.

What are the chances that their current work on the DNS issues might replace the underlying IP-addresses and hence we are making it harder on ourselves?

Re:Issues with upstream DNS provider by ab-dm on Tuesday August 23, 2022 @08:14PM (#32573383)
I thought about this, and it can't really get any worse than 'total outage', so I thought it was worth taking a shot. It can't go any more down.

It worked for me, so once Heroku has sorted their s*t out and their DNS system is back up it's just a matter of deleting the A records and replacing it with the CName.

Worst case scenario is the underlying Amazon IP Addresses change and it goes back down.

Re:Issues with upstream DNS provider by Trasmatta on Tuesday August 23, 2022 @08:17PM (#32573402)
Wouldn't the worst case be the underlying IP address changes, and your site now points to some other service? Since Heroku doesn't offer static IPs, I don't think.
Re:Issues with upstream DNS provider by cyral on Tuesday August 23, 2022 @08:25PM (#32573477)
Heroku seems to use the Host header on the HTTP request to determine what customer the request is sent to, so I don't think it can end up somewhere it shouldn't be unless the IP leaves control of Heroku entirely and is picked up by another AWS customer.
Re:Issues with upstream DNS provider by rsweeney21 on Tuesday August 23, 2022 @08:25PM (#32573475)
Heroku uses the host name to route requests. So you wouldn't serve another site, it would just give you an error that your site wasn't found or something.
Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:21PM (#32573438)
There is one more problem I can think of (but yes you're right, it can't get worse than 'total outage'): Heroku might detect that the CNAME is missing and will deactivate some stuff from their automatic domain management / TLS certificate issuing.
Re:Issues with upstream DNS provider by ab-dm on Tuesday August 23, 2022 @08:10PM (#32573354)
Oh my god, thank you so much. You're a lifesaver.

For those on Cloudflare, this will still work. I just deleted the existing CNAME, added the 4 IP addresses as seperate A records and it came back up instantly.

Re:Issues with upstream DNS provider by rajamaka on Tuesday August 23, 2022 @08:05PM (#32573314)
No historical DNS records on that site for us unfortunately, any other possible sites to check?
Re:Issues with upstream DNS provider by cyral on Tuesday August 23, 2022 @08:06PM (#32573331)
Try this command: nslookup DOMAIN 212.230.255.1

That is a random public DNS server I found on a DNS checker site that works (as it seems to be down from all the common ones like 8.8.8.8, 1.1.1.1, etc). DOMAIN can be your actual domain or the long heroku alias.

Re:Issues with upstream DNS provider by iancarroll on Tuesday August 23, 2022 @08:10PM (#32573353)
Thanks, for some reason this worked!
Re:Issues with upstream DNS provider by rajamaka on Tuesday August 23, 2022 @08:41PM (#32573592)
You bloody legend, thanks!
Re:Issues with upstream DNS provider by yangcheng on Tuesday August 23, 2022 @08:57PM (#32573716)
you saved my users! thanks so much
Re:Issues with upstream DNS provider by danra on Tuesday August 23, 2022 @08:46PM (#32573624)
This one worked for me: https://dnshistory.org/
Re:Issues with upstream DNS provider by alexpoof on Tuesday August 23, 2022 @08:54PM (#32573681)
Used this site https://www.whatsmydns.net, and it worked.

Unfortunately the Heroku issue lost us a few thousand $ alongside a few customers.

Re:Issues with upstream DNS provider by kennysmoothx on Tuesday August 23, 2022 @08:07PM (#32573339)
This worked for us, thank you.

And for those using Cloudflare, this method works.

Re:Issues with upstream DNS provider by bfirsh on Tuesday August 23, 2022 @07:58PM (#32573263)
This got us back online. Thank you so much.
Re:Issues with upstream DNS provider by jamesr101 on Tuesday August 23, 2022 @08:57PM (#32573717)
Can someone clarify what to do if your app doesn't use a custom domain, and running `heroku domains -a` just returns `my_app.herokuapp.com`, and then entering that into https://securitytrails.com/dns-trails returns no results?
Re:Issues with upstream DNS provider by iuliu on Tuesday August 23, 2022 @08:58PM (#32573728)
Do you use Cloudflare?
Re:Issues with upstream DNS provider by jamesr101 on Tuesday August 23, 2022 @09:00PM (#32573752)
No we just run our API on heroku and use no custom domain names. For some of us requests are working as normal, but for others every request is failing.
Re:Issues with upstream DNS provider by iuliu on Tuesday August 23, 2022 @09:06PM (#32573797)
What error are you getting? Because for us it seemed that the Cloudflare <-> HerokuDNS link was down. But even then I was able to access my app from the dashboard (like https://my-app.herokuapp.com/)
Re:Issues with upstream DNS provider by theunixbeard on Tuesday August 23, 2022 @07:59PM (#32573266)
Presumably if your site is behind Cloudflare then this strategy won't work, right? Since the IP addresses that Security Trails sees are just of Cloudflare rather than your actual Heroku IPs...?

Or is it possible in the Cloudflare dashboard there is somewhere to see your Heroku server's IP address?

Re:Issues with upstream DNS provider by bfirsh on Tuesday August 23, 2022 @08:01PM (#32573272)
You need to put in the herokudns.com address that the CNAME is pointing at – e.g. stark-wisteria-rnbgkawldfk6gq7m8308ytts.herokudns.com in our case.
Re:Issues with upstream DNS provider by iuliu on Tuesday August 23, 2022 @08:32PM (#32573531)
For me the securitytrails.com website just crashes. I put my DNS target: "stark-horse-mrp4jeowu9yvwpnnma32x6hd.herokudns.com", clicked "Run Check" and it seems to redirect to a failed (no CSS) webpage. Anyone else experiencing this?

EDIT: I MANAGED to make it work with this:

https://www.nslookup.io/

Make sure to go through all the tabs at the top (Cloudflare DNS, Google DNS) - for me they were all "no A records found". Only "Authoritative" gave me 3 A records which I successfully managed to use.

Re:Issues with upstream DNS provider by eappleby on Tuesday August 23, 2022 @08:48PM (#32573640)
That seems to happen when you put in a DNS target that doesn't have any records in SecurityTrails. In that case, it is best to use nslookup
Re:Issues with upstream DNS provider by jonathanreinink on Tuesday August 23, 2022 @08:40PM (#32573587)
Yeah securitytrails.com was working for me, but went down about 10 mins ago.
Re:Issues with upstream DNS provider by jplehmann on Tuesday August 23, 2022 @08:39PM (#32573579)
Thanks so much, it worked for us.
Re:Issues with upstream DNS provider by rsweeney21 on Tuesday August 23, 2022 @08:15PM (#32573388)
We use cloudflare. If you look up the IP address for your public domain name, you will get the cloudflare IP, yes. If you lookup the IP address of the CNAME target, you will get the heroku IP.
Re:Issues with upstream DNS provider by estafaa on Tuesday August 23, 2022 @08:41PM (#32573593)
on Cloudflare do you create A records (with found IPs) with name "www" or "mydomain.com"? also do you make that A record proxied or no? Thank you!
Re:Issues with upstream DNS provider by alexpoof on Tuesday August 23, 2022 @08:58PM (#32573725)
For my domain (https://www.poof.io), it's www.

If you just use something like https://poof.io, then it would be @. Depends on your site.

There should be a few historical IP addresses, but you would create an A record for each of them.

Re:Issues with upstream DNS provider by rickyc091 on Tuesday August 23, 2022 @08:54PM (#32573686)
Use an A record and type in @. Proxied is fine.
Re:Issues with upstream DNS provider by ladybro on Tuesday August 23, 2022 @08:15PM (#32573386)
Worked for us on Cloudflare
Re:Issues with upstream DNS provider by tdehnke on Tuesday August 23, 2022 @08:20PM (#32573427)
We use Cloudflare + Heroku and it worked for us.
Re:Issues with upstream DNS provider by rafaparadela on Tuesday August 23, 2022 @09:28PM (#32573946)
It worked for us too. Thanks.

Note: If you used to have a CNAME record for yourdomain.com to www.yourdomain.com, then you have to add two A records per each IP (one whose name is yourdomain.com pointing to the IP, and another whose name is www pointing to the same IP)

Re:Issues with upstream DNS provider by ______ on Tuesday August 23, 2022 @08:01PM (#32573282)
Bless you! Thank you for taking the time out of your day to help us internet people :)
Re:Issues with upstream DNS provider by newalexandria on Wednesday August 24, 2022 @05:52PM (#32586266)
Heroku reports the outage is over - but I wasn't able to resolve our Heroku-based domain name until recently today.

Should be able to go back to CNAME now. Regardless, recheck yours

Re:Issues with upstream DNS provider by muvb00 on Tuesday August 23, 2022 @10:37PM (#32574355)
Worked... thanks a bunch. Does anyone know if it's safe to go back to cname now or should I leave till the A record till the morning? Would prefer to get some sleep.
Re:Issues with upstream DNS provider by anayar on Tuesday August 23, 2022 @08:52PM (#32573663)
Worked for us on Cloudflare using the .dns Heroku target!
Re:Issues with upstream DNS provider by Maarius on Tuesday August 23, 2022 @08:09PM (#32573349)
Thanks so much, worked for us as well. I created A records for all three of the listed IP addresses but it started working for the first one already.
Re:Issues with upstream DNS provider by tuxninja on Tuesday August 23, 2022 @09:54PM (#32574118)
Yes, this worked for me...I was trying to do this right away, but I was missing a way to find historical DNS, thank you!!
Re:Issues with upstream DNS provider by tdehnke on Tuesday August 23, 2022 @08:07PM (#32573333)
Woot! Thank you - that seems to work, just used the first IP that came up on ST (there were 4 listed).
Re:Issues with upstream DNS provider by 0xChain on Tuesday August 23, 2022 @08:59PM (#32573741)
This saved our bacon and got me a pat on the back from our VP. Thanks!
Re:Issues with upstream DNS provider by Justsignedup on Tuesday August 23, 2022 @09:02PM (#32573757)
You and your team are brilliant. Thank you for this post! Much love.
Re:Issues with upstream DNS provider by johnnymetz on Tuesday August 23, 2022 @08:59PM (#32573740)
This worked for us. We're using Heroku + Cloudflare.
Re:Issues with upstream DNS provider by dmbrooking on Tuesday August 23, 2022 @08:47PM (#32573633)
Anyone know how to make this work for a subdomain?
Re:Issues with upstream DNS provider by nbarbettini on Tuesday August 23, 2022 @08:54PM (#32573691)
Do you have a CNAME record pointing to a herokudns.com domain? Replace it with an A record that points to the IP instead. You can find the IP by going to https://securitytrails.com/domain/<something-1234.herokudns....
Re:Issues with upstream DNS provider by bobsingor on Tuesday August 23, 2022 @08:04PM (#32573303)
Wow this worked! Your amazing! Thank you so much
Re:Issues with upstream DNS provider by seoneehills on Tuesday August 23, 2022 @08:44PM (#32573617)
I think I love you. We're back online.
Re:Issues with upstream DNS provider by ladybro on Tuesday August 23, 2022 @08:14PM (#32573384)
Worked for me as well! Thank you!
Re:Issues with upstream DNS provider by fusionflo on Tuesday August 23, 2022 @09:16PM (#32573870)
Thank you! You saved our ass.
Re:Issues with upstream DNS provider by bjoveski on Tuesday August 23, 2022 @08:29PM (#32573500)
Thank you a lot!!
Re:Issues with upstream DNS provider by frameworkzach on Tuesday August 23, 2022 @08:16PM (#32573397)
This worked for us too - thank you!

Edit: It also works for subdomains.

Re:Issues with upstream DNS provider by kwentakill on Tuesday August 23, 2022 @08:28PM (#32573493)
Working well !