It's not just a risk to the dog, it's also extremely inconsiderate to surrounding humans to let your dog wander around unchecked. I've been chased on horseback, bum rushed on foot, had my car chased. I can't even walk my reactive dog around here for fear of other people's wandering dogs. Seriously, people, keep your dogs where they belong...Honestly I think many rural people just trust their dog will return on its own, like with outdoor cats. And really, many do but it is a risk.
Good advice... but there are some dogs who wont even after that - stay inside the boundaries.If someone were to buy a farm and get a dog, I'd assume that the boundaries are marked by a fence. It may be an old fence with wires that sag so far down they are all but hidden in the grass, but it's pretty rare to not find any fence demarking land boundaries...except in the case where at one time a farmer had a big piece of land and then divided off and sold a smaller bit of it. If there is no fence, you need to put one up IMHO, entirely irrelevant to having a dog, but marking boundaries is important in agricultural areas. Existing fence-lines have a higher claim LEGALLY demarking borders and defining whose land is whose land than the best GPS survey results.
Anyways, walk that fenceline daily, or if its too big, walk a section of it daily. Have your dog accompany you on leash or off leash once his recall is good. Let him frolic and play and sniff and dig etc, but when he crosses over give him a command like 'back on this side buddy'. Initially combine it with calling him all the way back to you, but after a few days, you can cal him 'back on this side buddy' and then turn around and keep on walking, or doing whatever you are doing (like fixing the fence) and he'll soon get the idea that 'back on this side' means he doesn't have to necessarily run all the way back to you, just come close past some imaginary boundary. Pretty soon he'll start to connect what boundaries he crosses that triggers the call, and what boundaries triggers you going back do doing your own thing
Oh, and the best thing for teaching a farm dog about boundaries, or how to move cattle, or the day to day routine...is another farm dog.