Fuzz Leonard

Barbecue Barnstorming

How to Cheat at World-Class Barbecue

This is not intended to be a complete guide to barbecuing. There are a number of excellent books and online resources you can use for that—see the appendix below for my recommendations. This is a guide to cheating at barbecue to get the best flavor for the least amount of work.

What makes the best barbecue? Smoke from wood logs that are on fire. That’s all I care about. I am not going to waste money on a good piece of meat or waste my time cooking with sawdust pellets or smoldering wood chips on charcoal or electric elements or any of that. Depending on where you live you may have never had any barbecue smoked with (just) wood. I liken the difference to grinding your own coffee or black pepper compared to using preground.

To get smoke from wood logs on fire without burning food requires some sort of two-compartment chimney arrangement, the most popular being the offset smoker. I use a Yoder Wichita with its propane log lighter accessory. Load up your logs, fire up the propane to get them going, turn off the propane once a coal bed has developed, then put the meat on. The intent is that you do not cook with the propane, you just use it is an efficient way to get the logs burning.

Books and the Internet will tell you that it takes years to master cooking with wood on an offset smoker. I am telling you you can cheat and have it under control in a handful of cooks. Let’s do this.

Smoke

Smoke is key. But not just any smoke. We do not want thick, white clouds of smoke; we want the thin, blue smoke that comes from a hot-burning fire with nearly complete combustion. For backyard smokers this is traditionally managed by using logs split smaller than firewood to make a small, hot fire about the size of a shoebox. You need the wood small so it catches fire immediately and does not smolder, Smoldering produces bad smoke. You will rarely find wood that comes already split like this so you have brandish a maul or a chainsaw to get the job done.

That’s a lot of work. Is there a way we can get clean smoke out of firewood-sized split logs without having to make them smaller? As it turns out there is. By preheating the split log (we just call it a split) before putting it on the fire it will immediately burn clean. With an offset smoker this is accomplished by putting splits on top of the firebox. This works very well but take care because the splits on top of the firebox can catch fire.

Temperature

Temperature control is also key. Cook around 275-285F. Always cook with the firebox door open and do not use dampers to control the temperature. Dampers lead to bad smoke. There is an art to maintaining a coal bed and adding just enough wood at just the right time and shoveling things around just so to maintain a clean smoke and a steady temperature.

That is also a lot of work. Is there a way we can control the temperature while maintaining clean smoke without all this obsessive fire tending? Remember that propane log lighter? This may get me excommunicated from the Kansas City Barbecue Society, but propane burns clean and using it for a few minutes as an assist over the course of a multi-hour cook has no effect whatsoever on the quality of the finished product.

Normally what you want is to maintain the right temp and once it starts dropping—down maybe 10-20 degrees—you toss on the next split such that it goes back to the right temp, shovel things around a bit.

But maybe you fell asleep or did not want to stop watching Mr. Robot to go check on it and now the temp has fallen farther than it should have. You toss on the next piece of wood but it is slow to catch and smothers the existing fire a bit and the temp keeps dropping. What to do now? Relax and turn on the propane until it gets back to temp.

On the other side of things if your temperature gets too hot you can pull the fire and/or coal bed back away from the cooking chamber toward the firebox door—if that’s not enough you can shovel out some coals or logs. Getting the temperature down is easy—move the heat source—just be careful not to burn yourself in the process.

Stall

Due to the process of evaporative cooling (similar to how your skin cools itself with sweat) large barbecue meats tend to stall around 160-170F and stay at that same temperature for a long time, sometimes for hours, until enough moisture has been lost to stop the evaporative cooling process and the meat’s temperature starts rising again. Can we cheat our way out of this stall? You bet!

Some folks will wrap meat in foil with a bit of liquid to get through the stall (and finish cooking), essentially braising it from that point on. That path is not for us. Bark formation is key to good barbecue and to get good bark we cannot wrap our meat until we are past the stall. Plus braising can lead to meat having a roast-like texture.

The goal is not to get through the stall as fast as possible. In fact if we do not have enough bark we do not want to get past the stall until we do because we need to wrap it—which will stop bark formation—as soon after the stall as possible to preserve the precious moisture that remains after evaporative cooling. To prolong a stall you use humidity. You have a nice, big water pan in your smoker and you check on and spritz the meat with vinegar (or other liquid). The act of opening the smoker to check cools off the cooking chamber, slowing the cook, and the humidity and liquid on the surface of the meat slows the evaporation of moisture from within the meat.

Now the bark looks great but my meat is still stalled. What to do now? I read on the Internet this can go on for several hours! It is dead simple, just raise the temperature of your cooking chamber. Do not take it above 315F or so but that should be enough to get the temperature moving. You can dial the temperature back down as the meat reaches 180F or so, at which point you want to pull it off and wrap it in plain (uncoated) butcher paper before returning it to the smoker. Or just cheat and put it in the oven until it is done—it will not take on any more smoke after it is wrapped so you may as well. Use a pan to catch any liquid that may drip out of the butcher paper.

Secret Meat Rub & Sauce Section

You are cooking with wood. You do not need to get fancy or distracting here. Use coarse kosher (not sea) salt and preground (not fresh ground) black pepper, roughly 50/50. Treat good barbecue like good steak. Do you cover a good steak with a bunch of different seasonings and then drown it in ketchup?

Good barbecue does not need any sauce. If you do use barbecue sauce you should make it yourself; there is no sense in going to all this effort just to blow it with store bought sauce. Can we cheat here? Yes, avoid things labeled barbecue sauce but if you need to get something from a store check out other sauces. You can dilute with white or cider vinegar, thicken with cornstarch and/or honey. Aardvark hot sauce, for example. is somewhat thick and sweet and can work really well.

Appendix

You should read On Food and Cooking by Harold McGee, Franklin Barbecue by Aaron Franklin and check out amazingribs.com.

Never Bet Against The Cheap Plastic Solution

Paul Graham wrote an article recently about immigration and the tech industry. Matt Mullenweg wrote a response mentioning distributed teams as a solution and there was this thread on Hacker News with additional discussion about colocated versus distributed teams. Steven Sinofsky wrote a response to all of those.

I am all for changing immigration laws. If someone wants to move to Silicon Valley from outside the country to work I think that is wonderful and they should be allowed to do that. I do not, however, believe that the future of the technology industry lies in colocated teams.

Exceptional programmers are difficult to find. If we take it that exceptional programmers are rare and necessary for success then it would seem incumbent on the companies who need these individuals to maintain work environments that remove barriers to working with them.

I have been working in the tech industry for twenty years modulo hiatuses for creative projects. I have spent roughly half of that time colocated and half of that time distributed. I do not have conclusive or broad data to support what I am about to write; even if data was available there well may not be enough of it yet.

Distributed teams are an innovation enabled by technology. Arguments of authority–Google is not distributed, Facebook is not distributed, ask startup founders why they do not use distributed teams–are ludicrous. Gather around let me tell you about a little thing called disruption.

I am reminded of the late 90s when people were debating the use of Linux and other open source projects in production. “All the successful companies use Sun! Talk to CEOs they will tell you they buy Sun because Sun is what you need to get the job done! You. just. cannot. be. enterprise. with. Linux. it. is. not. true.”

The last time I dealt with Sun (circa 2003) they wanted me to renew a $35,000/year maintenance contract on two servers. The one time I had used them it took five business days to get a failed RAID drive replaced. I said no thanks and invested the money into ten FreeBSD servers, keeping five as spares. Those spares wound up as a cluster enabling the organization to innovate in ways that would not have been possible had we wasted resources doing things the old way. Today that much money would pay for ten nice EC2 instances and related supporting AWS services without upfront costs, facilities, maintenance, etc.

The feedback loop seems clear: innovation reduces friction, reduces barriers, reduces cost thus fueling more innovation.

These are not the wild west days of outsourcing projects to hustlers cobbling together low quality teams. This is 2015; we have GitHub, Stack Overflow, job boards for distributed teams, massive numbers of contributors to open source projects. Today quality remote workers and companies can find and evaluate each other directly.

The way I see it this comes down to synchronous versus asynchronous communication. We started with synchronous communication. We built empires on synchronous communication, we developed techniques and processes and hardware architectures all around this idea of synchronous communication. But as time passed we realized what a drain of resources it is to always employ synchronous communication so we started looking at asynchronous communication. Oh no! What a disaster! We designed all the things for synchronous communication! As technologists how did we approach this problem? Did we dig our heels in and start screaming for more and more powerful hardware to keep the old ways afloat? Yup. How did that work out? It gave us a little breathing room but then we had to put on our big kid pants and acknowledge the reality that we could no longer continue to cram everything into one place and expect it to scale. We had to change processes and the way we approach problems. And what happened? We discovered better ways to do things. Not merely different ways or almost-as-good ways, but better ways.

Asynchronous communication is efficient because senders do not have to wait for a response. People choose text messages over phone calls for the same reason. In 2015 we choose abstractions, languages and frameworks–functional programming, actor systems, immutable data structures and so on–that support asynchronous communication. But eventually we get to a point, for example writing to a physical device, that requires synchronous communication. Similarly while distributed teams choose tools and processes that support asynchronous communication there are times when synchronous communication is necessary. The day-to-day implementation of this can vary by team–team video calls and 1-1 manager video calls and so on–but something I believe should not vary for long-running teams is getting together once or twice a year for a few days on the company’s time and dime to do something fun. Not a tech conference or an all-hands work meeting but something fun. It does not have to be a whitewater rafting excursion; getting together in a centrally-located city and visiting museums is great too. There is a level of intimacy that only comes from having had face-to-face interaction, but people do not have to work in an office together to make that happen.

When people are focused–in the zone–interruptions can be expensive. We respect this with surgeons because the consequences of interrupting a surgeon concentrating are obvious. We respect this in the library. We respect this on the golf course. We have recognized it as an issue with colocated teams for more than half a century–Herman Miller introduced what would become the cubicle in 1964 based on research into open office layouts that concluded open environments actually reduce communication between employees.

A few weeks back there was an article in The Economist about cubicles and how workers could break free of them.

“Workers, the Cornell study suggested, like closed offices best of all. But open-plan offices are preferred to cubicles.”

“For reasons of economy, if nothing else, a return to private offices seems unlikely. But mobile technology is making it possible to work anywhere. Could it also offer an escape from the cubicle farm?”

Curiously the article fails to mention remote work as a solution.

I believe a well-run distributed team has more transparent and less siloed communication that leads to better collaboration. This may be a tortured analogy but I think of it like Facebook versus Twitter–you may have more friend-to-friend bandwidth on Facebook but on Twitter everything is open and transparent which leads to insights outside of one’s circle of friends and to the natural formation of groups of collaborators. Before I really “got” Twitter I thought it sounded like a horrible idea–strangers following me and me following other people just sounded creepy and there cannot be any depth with this character limit and blah blah blah. It was not until I had to use it for work that I really got that it was not a pale substitute for Facebook but rather a genuine advancement in human consciousness and communication. This is also how I feel about distributed teams.

A well-run distributed team primarily communicates via group text chat like Slack. As much as possible all communication happens in various channels that form by team or project or whatever fits best. Communication happens asynchronously, transparently and is immutably logged. Conversations are not lost or forgotten; they are viewable and searchable. People can be included in conversations more easily because they can participate asynchronously. New group members can quickly be brought up to speed on a given topic or issue by referring them to relevant logs. Cross referencing code commits with tickets and publishing changes either directly to a group’s room or to a “newsfeed” room provides amazing documentation. If I want to know why something was done I can look at the commit, find the ticket and find all the relevant discussion about that, how the solution was worked out–it may have required something beyond just code such as infrastructure changes or contacting a service provider. Colocated teams can do this somewhat, but there will always be large gaps that require relying on people’s memories of events to resolve. Fitbit > trying to remember what happened. You may say the need for this does not come up often and you would be correct, but when it does come up it can save days or even weeks of time. It can be a lifesaver in time-sensitive situations like production outages. It can help prevent service regressions. As technologists we love data, we can learn from data, we can use data to improve our processes. Distributed teams produce more and richer data about themselves and the work they do than colocated teams.

An industry embracing Big Data should look for ways to apply those insights to itself.

Is the world ready for asynchronous work? It took Slack less than a year to reach a billion-dollar valuation. A list of companies that use distributed teams I started last month already has over a hundred listings. Remoteville is well on its way to being a major tech hub and we have not even begun to tap the possibilities. Given asynchronous work environments and the decoupled nature of functional programming it is not difficult to imagine trivially outsourcing coding tasks down to the granularity of a single function if we had the software tools to frictionlessly manage such a process.

Should everyone work on distributed teams? Of course not. There are many varieties of people with different working styles and interpersonal needs at different stages of life. By all means support workers who want to cluster together, whether that means maintaining official offices or paying for cowork space or whatever works. The idea is not to force distributed teams but to create and maintain a workplace that is asynchronous by default to maximize transparency and efficiency so all kinds of workers and teams can flourish.

As technologists we do not write blog posts imploring people to please go to gyms because that is the best way to work out; instead we innovate and build wearables that people can use to monitor and increase their activity and fitness levels wherever they are. That is who we are and what we do. We are the cheap plastic solution you should never bet against.

Many thanks to Chris Allen and Zander Hill for their input on this article.

– @fuzzleonard

Postscript

I want former homeless people living in renovated former office buildings because we no longer know what to do with all the extra space. I want cities planning to build smaller highways instead of maintaining mile-wide strips of asphalt that are empty except during rush hour.

Harvard recently completed a 75-year study on human (male) happiness. Their conclusion? It is all about love and warm relationships. By making work asynchronous we can get the same amount of work done while spending more time with people we love and cherish, living happier lives as a result.

Making DynamoDB Hum

“DynamoDB is a fast, fully managed NoSQL database service that makes it simple and cost-effective to store and retrieve any amount of data, and serve any level of request traffic. All data items are stored on Solid State Drives (SSDs), and are replicated across 3 Availability Zones for high availability and durability.”

DynamoDB is interesting because of its ability to scale. Let us talk about the bits of DynamoDB relevant at scale.

Keys

Imagine our DynamoDB table is a giant hash. We call each key of that hash the hash key – clever, eh? When we query or get an item from DynamoDB we must know (or be able to deduce–more on this later) its exact hash key.

It is possible to configure DynamoDB such that there is one item–an item is a hash–per hash key. That is boring. We will not talk about that.

Instead imagine that our giant hash is full of arrays that are full of items. These arrays are indexed by each item’s range key and can be accessed using the Query API.

Consider a table containing Articles. We can use the UserId value of the article as the hash key and the UpdatedAt value as the range key. We can now use the Query API to efficiently retrieve a user’s articles for the last thirty days. DynamoDB goes to the hash key location, scans through the range keys (we can tell it which direction to look) and there we go.

Indexes

One table with two indexes means we need roughly triple the write capacity compared to the table alone. Solutions that involve external indexes require management of write capacities across multiple tables and possible data inconsistency–boo–but in the next few weeks AWS will offer Global Secondary Indexes which will hopefully render such schemes obsolete. Local Secondary Indexes–additional range key indexes–are available now.

What is an “additional range key index”?! Sorry! Remember our giant hash filled with arrays filled with hashes, those arrays ordered on a range key value selected from the hashes they contain? LSIs allow us to specify additional range keys so, to add to our above example, we have UserId as the hash key and UpdatedAt as the range key–we add an LSI so we can make a second range key on Name. Now we can also query Articles for a user’s articles that have a certain name or start with ‘z’ or whatever.

Global Secondary Indexes will allow us to add additional hash keys to index our tables. If we add Name as a GSI instead of an LSI then we can query all articles by name rather than just querying articles by name for a given user.

Partitioning

The write capacity of a table is divided evenly among a number of partitions. We do not know the number of paritions but it increases/decreases as capacity is added/removed. In order to utilize our total provisioned write capacity we must evenly spread writes across partitions to avoid hotspots because exceeding the capacity of any one partition will cause our table to be throttled. One approach is to choose random hash keys but this requires that we always know the exact (random) hash key of the item we want. To get around this a hash key index (external or GSI) is added. But! That index has the same hash key constraint–indexes are just other DynamoDB tables so the index hash key will suffer the same partitioning hotspot issues. Thus we have not really resolved the issue by choosing a random primary hash key but rather moved it elsewhere and doubled our required write capacity for the effort.

What to do now? There are two primary options. One is we can use something useful, like a UserId, as the primary hash key and add something to help randomize it. For example we could prepend a random digit 0-9 to each hash key. If we are storing a key for a specific item somewhere we can store it with the random digit and use that to get the item directly. If, on the other hand, we need to query for an item and we are not sure which of the ten possible hash keys it uses we have to query each of them (or better if we can figure that out) until we find it.

The other option is to spread writes for a given hash key out over time (or better if we can figure that out). Continuing with our example above let us imagine our app can import a user’s articles from WordPress in bulk. When that job runs for a prolific blogger we are suddenly beating the snot out of that UserId hash key. Throw those writes in a queue and work on them over time and that snot-beaten spot is not so hot.

Which approach to take (perhaps both!) and the implementation details will naturally depend on our data and usage patterns, but now we know enough to reason about the problem.

Patterns

DynamoDB’s constraints might be off-putting for a lesser data store, but DynamoDB’s speed, scalability, simplicity and cost make its contraints worth thinking about. There are interesting and useful patterns to be discovered.

For example let us go back to our Articles table example from above. We will use the UserId for the hash key again. But this time we are going to make a composite range key by prepending a SequenceId to a randomly-generated UuId. [Note that foreign keys–from Dynamo or other data stores–are an interesting choice to use here instead of random uuids long as they are unique within the primary hash key.] We take advantage of DynamoDB’s flexible schema and store the metadata item for a sequence–representing a Category–in position 0 and store the data items for a sequence–representing articles–in positions 1-n. We write the metadata item last to ensure consistency (potentially at the expense of some orphan items) and persist the total number of items written in it. We could also persist some sort of sequence index here, tags related to the sequence, etc. Once the metadata item is written we consider the sequence immutable. Now we can query a user’s categories by searching for all items that start with 0. From there we select a category whose articles we want; we know from the metadata item the sequence’s uuid and how many items are in it so we batch_get them. Thus if our metadata indicates our sequence contains three items we do a batch_get for hash_key[1.uuid, 2.uuid, 3.uuid] and DynamoDB efficiently retrieves the sequence for us. Yay. We could, of course, get them one at a time or in paginated batches instead. This covers a lot of use cases and does so without using an index. Naturally an appropriate solution to the partitioning problem above must be implemented as well.

Deleting

Deleting items from DynamoDB at scale is expensive. Avoid it if possible. Prefer to rotate tables instead–a new table for each month, for example–eventually expiring or moving old tables to cold storage.

Backups & Reporting

If we are running at scale we are probably going to be very unhappy trying to restore a DynamoDB table of any significant size from some other media. Rotating tables helps here by keeping things small but the only real way to quickly recover from, say, an accidentally dropped table, is a hot spare table. Also if we want to analyze the data on a table, as with reporting or other data mining activity, the recommended method is to use a hot spare table and do the analysis on it so as not to impact performance of the production table.

Scan API

The Scan API iterates over each item in a DynamoDB table. Just no.

Conclusion

Whew! There is plenty more to talk about but this should be enough to get us moving in the right direction. I will write a follow up article if there is interest. Have fun! Feel free to hit me up @fuzzleonard on Twitter.

UPDATE

I wrote a Ruby gem for this, https://github.com/fuzz/moe

Chasing Mercury

Last night @kristinalford asked on Twitter

“This is meta, but how do describe that feeling trying to grasp the ungraspable only to push it further away?”

to which my response was “chasing mercury” but as I was falling asleep (in the wrong place) it occured to me that I do not get that feeling any more. Somehow I have learned to trust my mind and that calm allows the information to wash up on shore eventually. This was not something I learned to do consciously so I tried to think of what I might have done that caused it to happen. The two things that came to mind were learning to play music and learning functional programming. As I lay there trying to remember when I crossed the threshold from chasing mercury to waiting for it to come to me I drifted off to sleep.

I woke up groggy a while later and had to go downstairs and across the house to the bed where I was supposed to be sleeping. As I walked into the kitchen I had a sudden flash of what I had been thinking about. I could not remember it except that it was interesting to me and I knew I wanted to remember. I grabbed a marker and a piece of mail that were handy, made a note of the words I could remember and then padded off to bed.

  • Connection!
  • Playing/learning music b/w
  • chasing mercury

Woke up this morning the whole thing was completely gone from my mind. Until after lunch when I stumbled across the envelope with the note on it. As soon as I saw the note I remembered everything.

Because my mind had not tried to chase the mercury.

Ruby in Jails: Hardening Your Infrastructure

A number of Ruby and Rails security vulnerabilities have come to light recently. http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/ is an excellent article about the situation and what you should do about it. If you do not have hardened servers you should follow the given advice to the letter. If you do need to rebuild this would be a good opportunity to migrate your infrastructure to chef, puppet or another tool that will allow you to easily rebuild again in the future.

But is it true that all servers will always be vulnerable? Can you not build out some servers that you can genuinely trust against common threats on an ongoing basis? 

It is true that all networked servers will always be vulnerable against a suitably skilled & determined attacker. But, yes, you can build out hardened servers that are extremely difficult to compromise–they will not protect you from a crack team of NSA PhDs or, worse, a really, really smart 13-year-old–but they will be immune to automated attacks as well as determined attacks from less-than-great hackers. Anyone who can compromise a well-hardened server has the skills to be making a lot of money, so you will generally be safe from most attack vectors unless compromising your server would be worth a lot of money to someone. But hopefully if you are in banking or such this is not your first introduction to hardened servers.

The Ruby community mostly uses Linux servers. I have extensive experience with Linux but when it comes to locking things down I prefer BSD. I started using Ruby about a decade ago when I ran across portupgrade(1) which is written in Ruby and at the time was FreeBSD’s primary tool for keeping third-party software from the ports system up to date. I was fascinated by how slow yet intelligent its behavior was; I could just keep running portupgrade(1) over and over again if I got stuck and it would eventually sort everything out. I have been a Rubyist ever since.

FreeBSD’s port system includes rubygem ports for gems with external dependencies. Install those and FreeBSD will make sure a gem’s dependencies are there prior to installation and everything gets upgraded in sync with proper versions forever. My upgrades look like

portupgrade -aRr && gem update

I almost never have to manually intervene; I cannot even remember the last time it happened. I have not had to install a dependency for a gem manually on FreeBSD in years.

My point here is that FreeBSD and Ruby go together like peanut butter and jelly and have for many years; this is not a new thing. Matz used to hang out on freebsd-hackers and much of Ruby’s philosophy comes from that community. That said, I do not expect many converts (and that’s fine with me–it makes me a harder target); but I do hope this will provide some ideas on how to lock down your own infrastructure, whatever platforms you may use. As with anything, one size does not fit all. In most of my environments I have at least a pair of hardened servers and try to keep the rest of the boxes as throwaway as possible. You do not have to lock every box down like Fort Meade. Unless you do.

I have included some links to the relevant FreeBSD documentation, which I find to be well-written, informative and helpful on most topics it covers.

Securing the disk: full encryption at the hardware level. This provides privacy even if the storage media itself is stolen or otherwise compromised (block-level copy). 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-encrypting.html

Securing access: only run services inside of jails (shared kernel VMs) and do not allow in-band remote server access whatsoever; instead connect serial ports on your servers to a console server and only access physical hardware out of band. These days an analog modem is a worthy choice as it is completely off the radar of today’s script kiddie and, as a bonus, you can access your physical machines *even if your data center’s network goes down*. Plus you can access BIOS settings, single-user mode and other system functions not typically available with a remote shell. Console servers are traditionally pared with remote power distribution units (PDUs) which are essentially power strips that you can control programmatically if you, say, need to power cycle a stuck server on a given outlet(s). Together these devices provide the mechanisms necessary to write scripts to self-diagnose and self-correct pretty much any server failure short of actual hardware failure. Virtual versions of some of these facilities are available with virtualization software (VMWare Server, etc) and server management cards (though beware a lot of the UIs for the latter are Java-only. And buggy to boot.)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html

http://avocent.com/Products/Category/Serial_Appliances.aspx

http://avocent.com/Products/Category/Power_Distribution_Units.aspx

Securing the process table and filesystem: securelevels, file flags, TrustedBSD/MAC framework; in the hardlink OS jail model the read-only paritions (/, /usr – BSD is very good about keeping read-only and read-write files in separate trees so they can be treated different on disk) are all hardlinked (saving inodes across jails) and immutable from inside the jail even by root. Better yet, a jail does not have to have root access at all and only needs a bare minimum OS–even a a single service from a single binary file on a read-only file system with no root access–in order to run. You can take things even further by setting file flags (such as immutable, append-only, etc) that can only be changed when the system is in single-user mode. Thus an attacker can only change these files when sitting in front on the server or when connected via console server as networking (much less sshd) is not available in single-user mode. Or take it further still and use the MAC framework for truly deep control, including the ability to limit the powers of root. SELinux provides similar facilities in Linux.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mac.html

Securing the logs: these security features can provide extremely detailed security auditing and logging (and control). With a bit of elbow grease you can capture any sort of malicious system activity you can imagine. Be sure to secure a copy of those logs; seperate, hardened log servers are good. One set up to burn logs to non-rewritable optical media (DVD-R, etc) is even better. Security features can be configured to only allow appending to certain files, etc, unless the system is in single-user mode (or a similar safe state). There are many different paths you can take, just make sure your logs are safe.

Securing the cloud: You do not own the cloud, you should not show the cloud your private data. Any data not meant for public download should be encrypted before being persisted in the cloud.

Securing the data: If possible (unless you are dealing with petabytes of data, in other words) you should also be backing your data up to hardened boxes. If the worst happens you want to be 100% sure that no one can tamper with your backups. Put another set of encrypted backups in the cloud, by all means–two or three copies even to be safe–but always keep one set on a hardened server. Backups to physical media should be encrypted, no exceptions.

Securing the network: I assume you already use an external firewall of some sort, whether it belongs to you or your provider. That’s great but I always also run the pf firewall locally on each server both to enforce security (for incoming traffic and for any ports opened by an unauthorized service) and to give me eyes into what is going on with the network on that box. This also lets me adapt the firewall on the fly–for example a script can watch the logs for excessive sshd login failures and then tell the firewall to block all traffic to and from from that IP address. PF also lets you route packets to and from local IP addresses so you can have any number of jails running on local IP addresses (127.0.0.2, 127.0.0.3, etc) each providing a different service on a different port on the same public IP address. In this way every service on a given public IP is provided by a different VM and a compromise to one is not a compromise to any other. Meanwhile the remote logging for all jails is running on the jail host (you can see all jail activity and read/write their filesystems from the jail host), which need not have in-band (ssh) access at all, and you have captured all the nefarious activity to your hardened log servers. Now you can make informed decisions about how to respond to the incident rather than having to assume that a compromised user account means wipe everything and start over. Which IS the correct response if you have not properly locked down your infrastructure.

You can never be entirely crackproof while connected to a network, but you can harden key bits of your infrastructure (the more layers of protection you have the more you frustrate any would-be attacker) and be prepared to quickly rebuild the rest from scratch if necessary–Chef, Puppet, PaaS from which you can spin up instances at will, whatever works best for your environment. Naturally not all of these safeguards will be available to use depending on your OS, hosting provider and other variables. This is not meant as a how-to but rather as an introduction to some tools that I use when securing my servers. With a bit of research and effort you can no doubt find similar tools for your platforms of choice.

Hit me up @fuzzleonard if you would like to discuss.

My response, as a former core IP & WAN backbone engineer, to the Vanity Fair feature on World War 3.0.

http://www.vanityfair.com/culture/2012/05/internet-regulation-war-sopa-pipa-defcon-hacking

We have secure DNS. It has not rolled out everywhere but it is not a problem that needs to be solved; it is a project that needs to be completed.

It is relatively simple to cache DNS locally, which not only prevents a government DNS shutdown from having serious effect on sites you already use, but also speeds up browsing and reduces load on DNS servers. New DNS entries would be missing in the event of a shutdown, but the majority of functionality would still be there. And it would be relatively simple to pass around an update file containing new entries to keep email, social media and other key sites functioning properly. Augmenting existing DNS caching software with versioning and rollback would make it even more robust and be trivial to implement with (for example) djbdns and git. 

We have good cryptography.

What we need is one simple (ha ha) technology disruption to take government and big corporations out of the equation: cheap WAN technology. Once we have cheap WAN technology it will not matter what governments and big corporations want to happen unless we move to a 1984 style of government intrusion where private journals are illegal. World War 3.0, game over.

Of course WAN technology is currently very expensive, which is why government and big corporations are so wrapped up in it. Even if the gear was inexpensive, with today’s technology you still have to deal with laying and maintaining massive amounts of fiber optic cable (and leasing the right-of-way to do so), blasting satellites into orbit and other big, big dollar expenses.

This will not be an easy problem to solve, but once it is solved all this hand-wringing and regulation nonsense will be out the door. When we can spend $50 for a high-capacity WAN endpoint that does not need satellite or fiber it will not matter what governments or big corporations want to happen; it will be our Internet forever.

I am thinking a public relations firm for science. Rather than individual research organizations writing grants, seeking crowdsource funding and so on, there would be a central organization, or multiple decentralized organizations, to perform this function–a layer of abstraction.  A Philanthropy Director would use quantifiable metrics to identify projects that will do humanity the most good such that philanthropic organizations could donate with confidence, knowing their money will go to those projects. An Industry Director would maintain relationships with industry, identify and pitch projects with potential commercial value. Crowdfunding Director would maintain relationships with the major crowdfunding sites, identify and pitch projects likely to have mass appeal. Government Director would maintain relationships with government agencies and keep up with the latest programs, matching up projects to available funding opportunities. A few points would be shaved from all incoming monies to fund pure research. Monies from overfunded projects would go to underfunded projects.

The biggest obstacle would seem to be creating a fair system, such that the people operating these agencies do not try to influence research with their own agenda.

UPDATE March 21, 2012:

A key function of this agency could be as a buffer between sources of funding and researchers. Scientists are not, generally speaking, great business negotiators, a problem exacerbated when they are dealing with a sole source of funding. I have witnessed a fair amount of stress and arm-twisting and have worked my share of late nights to keep project sponsors happy. An agency in the middle could mitigate this, negotiate on behalf of researchers, manage the expectations of sponsors and even step in with backup funding should a major dispute arise. And since there would be a central agency or a group of central agencies that share information, sponsors could not easily say, “Well, I will just take my money elsewhere and find more compliant scientists." 

A futurist moves back to his hometown in Louisiana to turn it into a technology showcase, but no one in the city government seems interested in the jobs, prestige and prosperity this will bring to the area. As he probes to understand why he realizes not everything in this town is as it seems–the town has a secret, a big one. Perhaps something to do with the large military base nearby? A cast of colorful characters, intrigue and plenty of forays into futurist thought and technology.

In its current form the Internet is expensive. Massively, mind-bogglingly expensive. Your end-point is relatively inexpensive–I pay $80/month for an Internet connection that would have cost me $20,000/mo in 2000. And a data center, while not cheap, is easy enough to get together funding for. But WAN technology is expensive. Leasing rights along railroad tracks, digging thousands of miles of trenches, laying down fiber. Or blasting satellites into space. Laying cables across the ocean. We are talking Big bucks here. 

We do not want the Internet controlled by government, but government is the structure we humans have in place to control and manage essential shared resources like roads and fire departments. We also do not want the Internet controlled by big corporations. Or a group of eccentric billionaires. But those are the realistic options with the current cost of WAN technology. The option where we let government, big corporations and/or billionaires pay for the Internet but insist that we retain control of it is not on the table.

But I have an idea! Instead of lashing out in a battle that cannot be won how about instead we get together and develop inexpensive WAN technology and then we can say goodbye to the oligarchy-controlled Internet once and for all.

It is not just a good idea, it is the only viable solution to a free Internet. Period.

utopiapi

I am a big fan of buying local. I am big fan of shopping on the Internet. I am a big fan of living a car-free lifestyle. We walked to the hospital to have our first child, and we walked him home. Our last child was born at home and, as far as I know, has never ridden in an automobile, though he does ride public transportation from time to time.

It is great to ride a bicycle and I have a trailer I can load with groceries and such, but this is the rainy Pacific Northwest and we have four little kids. What I really want is to be able to shop an Amazon-like site that knows where I am and what stores near to me have in stock and lets me buy stuff from them via credit card/Paypal/whatever. And have it delivered either directly by them or contract someone to go pick it up–cabs would probably be awesome for this, especially if it can be arranged so that they are doing the pickups nearby after dropping off a fare, such that time that was being wasted on unpaid, unfruitful return trips can now earn them extra money. And since most deliveries are not especially time-sensitive as long as they happen within a day (unless frozen food or donor organs are involved) the picked-up items could be brought back to the cab garage for later delivery, when a call for a cab from/to the area is received.

This goal is easy to achieve with today’s technology. So what’s the holdup?

Lack of a standardized API and lack of someone or something to drive adoption of such an API by POS/inventory system vendors. Lack of a geolocation-aware API directory publishing service. 

The way I see the future, a shop or restaurant in a well-traveled area will not need its own website–third-party developers will use the available API data to create aggregate websites (perhaps supported by advertising) that let you browse the menus/inventory of all restaurants and shops in the area. Thus rather than zooming in on Alberta Street in Google Maps and then going along checking out the websites, yelp reviews, etc, of each place, one could just go to an Alberta Street site and see/search it all.

Less investment for the shop owners, more exposure, better data/experience for consumers, new income streams for web developers, a fantasy playground for entrepreneurs. Delivery services are a simple, obvious example; once this actually exists the ensuing creativity and innovation will produce game-changers we can only begin to imagine.

I see this as less of a technical challenge and more as something that requires people and persuasion skills–coming up with a generic standardized retail/restaurant API and directory service can probably be done over a weekend. The real work will be in getting all of the various POS/inventory system vendors to agree to the spec and either getting them to either develop the interfaces for their products internally or convincing them to allow others to do it for them. 

I do not mind participating, but I do not have the spare cycles to be the lead on this. Any takers?