You can "broom train" your ducks.
Mine kept running around me and up and down the hill, just out of reach. I took the broom I use to sweep up the coops and used it to extend my reach and block them so they would turn and run the right way. I used horse training methods on them. As long as they were heading away from the coop the broom was chasing them. Head toward the coop and the broom was quietly resting on the ground. Move too slow and the broom slaps the ground behind. Try to run by and the broom turns into a scary hawk. They learned to go in the coop at the sight of the broom. Chickens, too.
No fowl was harmed, although a few tail feathers were insulted.
A broom propped across an opening makes a quick temporary barrier, as it may get up and chase a duck.