I would not be concerned too much about these small boat attacks. The range their rockets are effective at is atrociously bad:
The simplest countermeasure would just be to set up a bunch of mini-gun and .50cal positions around the ship and fortify them with sandbags or concrete barriers. Give the gun crews night vision and just have them hose the sea around the ship if they get in trouble. If you've seen The Sand Pebbles you get the idea. Great thing is it could be fitted to any ship: from tankers to cruisers.