From chasing game to trail criminal chasing, to a dog a car is no different then a huge rabbit. Putting in an underground electric or above ground fence is your best bet. But if this is not possible or you would like to have your dog out with you outside the fence, you can try using a shock collar with a hand help control. When the dog chases after a car you shock them. Some people may think this is cruel to use a shock collar, but it is worse for the dog to get hit and run over by the car.
Nothing is better than a fenced yard.
But, in a rural setting with a lot of open land this is a good alternative. It is the same idea as using an electric underground fence. These fences work by putting a wire underground that you can not see. If the dog starts to wander off the property, or the boundary you sent for him, the special collar the dog is wearing shocks them. The dog soon learns his boundaries avoiding the shock, and he will soon learn not to chase cars as well.