The closing off of a city or port to prevent passage is called a blockade.