Coastal defense is the protection of a coastline from attack by sea.