Any dog can be taught boundaries.
My girl is very territorial, but does not leave our property line.
I'm sorry, but don't know really how I taught her to do that. LOL

, I assume it was because anytime she approached the boundaries, she got a verbal correction, and praise as soon as she returned.
I've heard of people using a long line for teaching dogs limitations. Apparently it only works if the dog is RUNNING or moving fast towards the boundary.
A lady I knew had a herding dog, that would run into the field and nip at horses hocks. She was advised to put a long line on the dog, tied to something. When the dog ran to fence to chase the horses, he got caught at teh end of the line and got a huge leash correction.
Now, he'll run full tilt toward the fence, stop and sit a foot away.
So your dog is loose outside when your not outside?
Not to lecture you, but that sounds very dangerous. He could get hit by a car, stolen or hurt someone.
Do you not have a fenced in yard?
For the safety of the dog and people, I'd work on his boundaries outside off leash, only when your around. A good way would be with two people, later on at night, or when there is no traffic on your street.
First practice on leash. Get the person to stand about three foot away from the curb on the street, and call your dog. When he approaches the street, I'd give him a quick pop on the leash, and immediate verbal praise, when he faces you or sits. Reward with a treat.
It'll take some time and patience though
