Is it forbidden to fight to defend your possessions from a thief?
Resisting or protecting what you have is not forbidden. But you shouldn't kill. It is perfectly fine to say no to someone who is trying to take advantage of you. It's perfectly fine to have  a non-lethal security system for your house. That does not get in the way of Brahmavihara.