Interdicting shipping on the high seas might be considered an act of war - but closing the borders of your country to foreign cargo, i.e., not allowing transit through your own territory of foreign goods is most certainly allowed under International Law.
Regards,
It depends.