you could try getting someone he dosnt know to walk past the fence (maybe a friend) and you can come outside when he starts barking and use a firm NO! command and this will teach him that hes not to bark when someone walks past,,,
hope this helps hunni,,,

xxx