Crazy thing is, you might not be able to. I've heard several stories where people put up bollards or barricades and had to take it down because it obstructed visibility or presented an undue danger or something like that.
There is a house near me at the bottom of a hill, and they've had people drive into their living room several times. They constructed a concrete wall by the road, but the city made them tear it down because I guess it was a hazard to drivers or something crazy. These days, that side of their yard is basically entirely covered by massive ceramic flower pots.
So if you do it, do some research. Maybe it would have to be boulders or a low brick wall or something like that to comply with municipal regulations.