Of course in the USA and Canada, it is illegal to defend property by force, except maybe in Texas.
Texas is probably the classic example but many of the other states have similar laws: https://en.wikipedia.org/wiki/Castle_doctrine