The Colonial Defense Mainframe was the high-security central computer where it's presumed all Colonial Fleet data, logistics, strategies, and software are managed, stored, and tested. It is presumed that the Defense Mainframe resided in, or was accessible from Caprica City.
Two years prior to the events in the Miniseries, scientist Gaius Baltar allowed a fellow programmer and love interest to aid him in completing the Command Navigation Program, an avionics operating system for use on most Colonial ships, fighters, and some civilian ships. The woman, an experienced programmer herself, rewrote many of the CNP's algorthms and other programming. The CNP was distributed as part of a fleet software upgrade a short time later.
Baltar discovers later that his love interest and collaborator was a Cylon agent, model Number Six, who used Baltar to gain access not only to the CNP, but to the Colonial Fleet's "communications frequencies, deployment schedules, unlimited access to every database." As a result, his Command Navigation Program contained a backdoor that allows the Cylon Raiders and basestars to send commands to disable any CNP-equipped Colonial ship, from fighters to battlestars, leaving them defenseless.
Battlestar Galactica's computer systems were never networked, nor was the CNP installed to any of its subsystems. As a result, Galactica survives while almost all of her sister ships meet their demise in the Fall of the Twelve Colonies. (Unknown to Galactica at the time, battlestar Pegasus survives by virtue of having its computer systems offline while in space dock during the Cylon assault.)
Galactica's last Viper Mark VII squadron was equipped with the CNP, which leads to their immediate destruction by two Cylon Raiders in the early moments of the attack.
According to Shelly Godfrey, the Defense Mainframe was destroyed by an explosive device, ostensibly placed there by Gaius Baltar, moments before the Cylon Attack (Six Degrees of Separation). The charge is later dropped when the investigation appeared to reveal that Baltar's image had been falsified in the recording from Godfrey.