I guess a leash and a collar are everyone's answer, but beyond that I have to give a huge shout out to the e-collar.
Because of what the e-collar provides, my dog has had true off leash freedom since he was about 6 months old.
He gets to run, sniff, explore, pee, poop, play, chase, and bark...