It cannot be done. The border is too long, too rugged.
Look at the 38th parallel in Korea. The fence is about 200 km. What is the border between Afgh. and Pakistan? 1600+ km?
The length of such a border makes it impossible to do.
Think of the man-power required to create posts like this every few hundred meters. Each would need night vision, weapons, communications, support. That's perhaps 5,000 manned posts, with 2 to 4 men in each.
And a section of such a fence is easily overcome with a quick assault, allowing a temporary breach through which hundreds could pour and scatter.