We have a training collar we use on our one year old. It can give him a shock, and the intensity is adjustable. It also has a vibrate mode.
there's another one like that but instead of a shock, it sprays citronella at the dogs face, which gets up their snout and they don't like at all.
I recall I had to once do a delivery to someone on some acreage. I got out of the car and was halfway up the long driveway before two huge German Shepard's came racing around the corner barking their heads off. I was caught unexpectedly because there was no fencing anywhere. It was to late to turn and run back to the car so I just froze. They raced up to a point about 3 meters (10 ft) in front of me and they just stopped and waited. The owner came out and when I asked him why they stopped, he told me that just in front of them, and about 30ft around the circumference of the house, was a buried wire, and if they approached to within a few feet of it their collars would first vibrate in warning and then give them a small shock if they crossed it. According to him they only ever crossed it once when they were pups ... never again.
It turned out they were great dogs and only wanted a pat. When went back after that, I would always made it a point to play with them a little.