If, as it appears from the images...
the item is made of cast iron, it is almost certainly an 'alarm gun', intended to be used with a tripwire as an unmistakeable signal of an unauthorized entry, and with blanks only. It is not a boat gun, nor is it intended as a lethal boobytrap. They were...