Fro the research
I've done, here's how I see it:
system to alert you to their presence and maybe scare them off, means to contact local authorities, secure cabin
to keep them out until the authorities arrive. A firearm would be good to have, but you simply cannot legally have/use it in this situation - and I personally fear a third world prison much more than any criminal - so no gun.
At sea - playing "turtle" in this situation is much less likely to work, since your attackers are likely to be more determined to have followed you out to sea, and the authorities (or any other help) are much further away. If the attackers have firearms and you don't, you need to surrender - playing rambo with a boat hook is more likely to get you killed. If they don't have firearms (mind you, it may not be clear whether they do or not) then use your boat hook, your machete, your molotov cocktails, or whatever other jury rigged weapons you can legally carry. With a little forethought and practice, you should win - you have the advantage of knowing the boat and not having to climb up the side and over the lifelines
to get at your opponent.
So, IMO, you'd be fine without a firearm at anchor
, and at sea if your attackers are unarmed. You only need a firearm for when your attacked at sea by armed opponents. The best job for this task IMO would be a bolt action high powered rifle - rested on the cabin
roof, you will win any engagement with AK-47 wielding gunmen on a bobbing skiff (in all likelihood, they'll just run away once you start firing in their general direction). I don't see the purpose of a shotgun or pistol - you don't want them to get that close. What about the legal
issues? If you're in international waters, no problem. If you're far enough offshore
in territorial waters, use of the weapon is going to be illegal, but you have a reasonable chance of getting away with your "crime." Near shore, where somebody might hear the shots and calls the big pirates with badges, that's a roll of the dice.
So, much as I loathe the idea of having to wade through bureaucracy to carry my rifle aboard, I'd probably do it.
Feel free to take my thoughts with a grain of salt
since I (like virtually everyone posting
here) have no actual experience with these situations.