After nearly scoring in the first 30 seconds, Duns found themselves a goal down within a minute.
The Dingers went two down in eight minutes, but within half an hour Duns pulled a goal back when Mark Weatherburn scored from close in.
The wind played a big factor in the game with Ormiston catching the Duns defence out with their long ball game and this resulted in the home side extending their lead to 3-1.
. The Dingers, to their credit, pulled two goals back through Brydon and Chisholm which meant the teams went in all square at half time.
The second half started with Duns playing with the wind and the crowd were treated to a seventh goal in the 73rd minute which put the visitors in the lead for the first time.
The goal came from the boot of Chisholm, assisted by an Ormiston defender.
Shennan added a fifth with a headed goal from a very tight angle soon after.
A tense final few minutes had to be endured when Ormiston scored their fourth in the 88th minute.
Duns held out for a well deserved victory giving them an away tie against Leith in the next round on October 13 .
Duns may have won this game, but four goals conceded shows work is still needed to tighten up the defence.
Duns; P Tansy, J Ainslie (M Robinson), L Walker, R Burns (M Stewart), S McHoul, J Brydon, D Chisholm, S McGregor, S Shennan, M Tait, M Weatherburn.