It's a blog

Tag: Orain

Orain backups

There are more Orain backups! More recent than 15th June 2015 as stated in my previous post! Dumps from August 2015 are all on-line right now!

Many thanks to WikiTeam at

Simply search for “Orain subject:wikiteam” and you can find all of the dumps. Of course you can add the name of you wiki to more easily find it in the list!

Edit: Simply search for “WIKINAME subject:wikiteam” and you should be able to find your dump (where WIKINAME is the start of your orain domain)!


Downfall of Orain

So, from where I am sat right now, it looks like Orain is dead. It could just be me but Orain has been struggling with issues for a while now and the events that took place last week were basically the final nail in the coffin.

As final nails in coffins go, I don’t see this nail being removed any time soon.

Some brief history and facts

Orain was founded by Dusti and Kudu in July 2013, which means it is currently just over 2 years old. Orain has no paid ‘staff’ but instead is kept on-line by a small team of volunteers. The number of volunteers trying to keep the sites up at any given time has varied although in the past month of so that number dropped to 2. During the 2 years the Orain services have been on a variety of different hosts, including AWS, Ramnode and most recently DigitalOcean.

Last week ( 16 Sept 2015 )

Firstly I will say that I still do not know exactly what happened, or how, but it must have been one of the following things:

  • Someone did something stupid with a password. This could have been accidentally posting it somewhere, sharing it with someone or not keeping it in a secure location.
  • Someone with access to the email forwarder had their email address compromised.
  • Someone on the inside decided that it was time for Orain to die…

There are other options but frankly the likely hood of those compared with the list above is slim.

Rough Timeline (UTC)

  • 01:44 the CloudFlare password was reset (we have a an IP address relating to the reset of this password).
  • At some point the mail DNS records for were changed, pointing to an external server (not in orain control).
  • At some point the password for DigitalOcean was reset, made easy by the fact that this person had control of the email accounts.
  • At some point 1 in 2 requests were redirected to a questionable device. You can find an image of the change that was made here.
  • 09:20 I woke up to see Orain in a mess and Informed Dusti and others by email while trying to see what on earth happened.
  • 16:00 Confirmed that the ATT databases was no longer on the server. A screenshot can be seen here.
  • Also confirmed that someone had root access to the servers using the DigitalOcean panel, screenshot can be seen here. (It should be noted this shows the root user as idle for 9 hours at 16:00 UTC, meaning at least for prod5 the user was active last at roughly 07:00.
  • At some point in the afternoon / evening all machines were powered down.

What I can say with 100% certainty.

  • I have backups from 15th June 2015 @ 18:00 UTC for all wikis that existed at that time and I am more than happy to give these to people.
  • EDIT: Backups from August 2015 are available on
  • The ATT database was deleted, but I was not able to SSH to the primary database server so those databases may not have been deleted.
  • As the user had root on all servers via the DigitalOcean control panel it should be assumed that ALL data was / could have been compromised. This includes usernames, email addresses, names and hashed & salted passwords. This also includes access logs meaning IP addresses, user agents and request data which could all be tied to users.
  • I do not have any backups of the uploads, although these had not been deleted before the machines were powered down.
  • Right now I have no idea if the machines were simply powered down or deleted (they are only VPSs after all)
  • At this time I believe Dusti is trying to gain access back to the DigitalOcean and Cloudflare accounts, until this happens it’s hard to really say or do anything more.

Possible conclusions to all of this

  1. Orain gets access back to DO, the servers are still there, it is powered up and the dbs & uploads are still there
  2. Orain gets access back to DO, the servers are still there, it is powered up and a mixture of dbs and uploads are still there.
  3. Orain gets access back to DO, the servers are still there, it is powered up and all the dbs are gone & the uploads are gone.
  4. Orain gets access back to DO, the servers are gone…
  5. Orain does not get access back to DO…

EDIT (well, option 6 here happened.)


I am happy to answer any questions I can, although basically everything I can say is written above.

As I previously said I would have expected the founders of Orain to inform the users of Orain of the events, but apparently they haven’t found the time to, or don’t want to, or a mixture. I hope that they will soon.

Personally I want to make try to help everyone that did have a wiki with Orain, I have the backups and am of course willing to give them to the wiki owners so that they can move to new hosting.

  • etc….

Other Orain posts

I have a few other posts about Orain, you can find them below.

DDoS of Orain

During May of 2015 Orain was the target of a DDoS attack. The attack ended up lasting roughly 9 days and bringing the service to its knees repeatedly. The ‘official’ timeline of events and write up can be found here. Below I will discuss why the details of the DDoS as well as how it took Orain down so easily and the measures that have now been put in place.

Details of the DDoS

Orain 20 May DDoS DigitalOcean TrafficThe DDoS was first detected on May 20th and immediately took down all of the Orain services, although at this stage no one knew that it was a DDoS, we simply thought Orain was having IPv4 routing issues as the site was still accessible on IPv6.

After messaging DigitalOcean support they revealed to us that they had nullrouted our load balancing instance (the main instance needed to access the website) due to an inbound DDoS, they also apologised for a lack of automated email about this.

The image to the right (sorry for the poor quality, apparently I didn’t take a screenshot but took a snap on my phone) shows the spike of around 800Mbps inbound on the public network interface and a small increase in the internal traffic. After this spike both interfaces can be seen to fall to 0Mbps. This was due to the public IPv4 address being nullrouted by DigitalOcean.

After a period of time DigitalOcean would return the original route of the IP to our box and service would be restored for a short period before the next round of the DDoS hit us, and repeat…….

The DDoS did not concentrate on a single instance but as all public IPs were available to the world on GitHub the attackers could easily target them all and bring down every last service Orain was running, mail, dns, web, stats etc.

What changes have been made

So as discussed above the reason the attack hit Orain so hard was because all of the public IPs for servers were available to be abused. This in combination with our services being run on VPSs which nullroute traffic when DDoSs are detected meant attacking Orain was really quite easy..

Firstly I made the switch to CloudFlare. This would mask the IP addresses of the servers when, for example, requesting Previously this would have pointed you directly to the public IP address of our load balancer, now it will direct you to an IP address for CloudFlare’s CDN. Of course with a change of name servers we had to wait for this change to propagate around the world.

This in itself was not enough as of course the attackers already had our IP addresses and continued to DDoS Orain once protected behind CloudFlare, thus we needed to rotate the IP addresses of all of our servers and make sure that the new IPs were no longer visible anywhere.

The easiest place to find all of our IP addresses was in our public DNS configuration repo located at With the move to CloudFlare this repo would no longer be used, so check, no new public IPs here!

The second place that public IPs could be found was within our Ansible playbook located at All public IPs were replaced with private internal IPs in this change as well as the addition of a hosts file to ensure all instances always resolved Orain domains locally rather than being pointed to CloudFlare.

So, Lastly, IP rotation. DigitalOcean do not provide a user with an easy way to grab a new public IPv4 address for a machine as of course this is something that could be easily abused and thus the process takes a bit more time. Each box must be shut down, a snapshot created, then a new box created from the snapshot. For all of Orain’s servers this took me roughly 1 hour.

TADA! No more DDoS :)

Side effects of the changes

  1. The Orain DNS configuration is no longer publicly accessible and contributing to it is of course more difficult. This isn’t something that really needs to change that much though.
  2. CloudFlare only supports wildcard domain support with full proxy services if you pay them $5000 per month, which of course Orain can not do. Thus Orain now has a CNAME record for every wiki that it hosts. A change has also been made to our CreateWiki extension to automatically create these.
  3. No SSHing or accessing servers directly via domains. Previous to this we could simply ssh to ‘’ for example, but now of course this domain points to a CloudFlare IP address.
  4. Custom domains of course broke. Custom domains were either pointing at the old Orain name servers which are no longer being used, or at the IP address of the load balancer instance which has no changed. Currently as we want to keep our IP addresses secret the only way to keep your custom domain working is to CNAME it to ‘’ which per an RFC may not actually be allowed (but works with multiple hots all the same). See this stackoverflow question. Another solution to this would be to have a second load balancer with a public IP not routed through CloudFlare, thus if it was ever DDoSed then only custom domains would see downtime.
  5. Our traffic is now being routed through the CloudFlare CDN which has apparently saved 25% of the bandwidth from needing to go to our servers (around 3GB) according to their dashboard.
  6. We are currently only on the free version of CloudFlare meaning that we are using SNI SSL which is not compatible with some browsers.


  • I wish this post had more images in it.
  • I wish it had not taken the team 9 days to resolve the issue (sorry for the downtime guys).
  • I wish we were not being DDoSed in the first place…
  • I believe a more detailed analysis of the DDoS itself may be released / discussed in the future.

Quick overview of Orain

Orain is a community-driven, not-for-profit wiki network that I help to maintain.

It runs Mediawiki and has been around for the past couple of years. Over the years it has been hosted on VPSs from multiple different providers and its technical layout has changed massively from each provider. Below I will try to summaries it’s current layout! This will include:

  • The machines / VPSs – ( how many there are, what they are doing and why )
  • The management of these – ( using ansible )
  • The configuration of Mediawiki – ( how Orain is running the ‘wikifarm’ )

Continue reading

© 2021 Addshore

Theme by Anders NorénUp ↑