All other issues aside, even assuming you can get the proper permissions, bringing guns into foreign ports is a major hassle and involves significant legal paperwork.
Companies that provide armed security for cargo ships for example will keep the weapons on a boat at sea in international waters, transfer them to the cargo ship at the beginning of their security detail, then take them off with another boat before the cargo ship proceeds.