In brief
The defence uses the narrow corridor between the Caspian Sea and the mountain.
Useful to know
Derbent is connected by a Sassanid fortification system, in which two stone walls extend from the sea to the mountain. The city develops between them. The place has a long-standing strategic importance. [1]
Here the fort is not only understood as a closed ring around a compact settlement group. On a map, trace the cross-section of the natural corridor. The terrain explains why the lines are placed right there. The comparison of the natural barrier and the built protection shows the relationship between architecture and traffic control on a larger geographical scale.
Sources
For further detail and to check the information: