As a part of the westwall the Germans had special openings developed for the roads. They ranged from simple wood parts up to massive concrete openings.
Here a picture of some of them as I have built them in the past.
In the case the enemy would come closer the Germans wanted to block the road with rail pieces. The most effort was made to protect some areas in the Nedderlands where the Germans built some of the below shown fortifications. In German they are called "Walzkörpersperre".