Here is an interesting article on the subject.
http://globalintel.net/wp/2008/11/2...in-maritime-counter-terrorism-counter-piracy/
The enemy looks like this: on sea, you have pirates on skiffs that make the capture. Mother boats or ships are also employed. The pirate ports are run by organized crime or terrorists, whatever you want to call them. Reports to the contrary, I believe satellite recon is there to pinpoint every one of these port operations.
Putting CIWS on every ship is costly and a serious security compromise. Deploying a huge naval force is needlessly expensive.
Do the international diplomacy and legal work first. Make use of multinational military resources. The more countries that are on the same page with us, the better. Make shippers pay the bills as much as possible. You need some adjustments to maritime law regarding weapons and the merchant marine and deployment of marines on merchant ships.
Next, stop active piracies. We don't want to add more ships and hostages to the pirate ports. Typical pirate attack skiffs are armed with AK-47s and RPGs. A marine squad on every merchant ship with portable or shoulder-fired missiles can identify and destroy any pirate skiff before they take the shot.
A couple of missile frigates with cruise missiles or predators can take out the mother ships.
The big bang. Once the active piracy is stopped, wait a year or two until captured ships and hostages are less of an issue. That will be the time for a larger military action to recapture remaining ships and hostages and destroy the pirate ports. Play it smart. Give civilians a warning and then flatten the ports.
That will be the end of the piracy problem.