The best defense in some situations is a well fortified base. This would be your best option during times of civil unrest and the possibility of people coming onto your property to steal what you have is a real possibility.
Unfortunately, you might find yourself in this kind of situation and if you do, you are going to want to be secure inside your fortress and ensure that the necessities that you have worked hard to procure are safe and sound with you.
I would generally recommend finding a better location such as a hardened building like an abandoned prison or even a school to hide in, but sometimes you are just going to have to think about whether you want to even leave your own property.
If you are planning on staying at your own home, you might want to consider some form of camouflage. I don’t mean painting trees on the side of your house to blend into the background, what I mean by camouflage is that you should make your home look abandoned and not a viable location for any raiders of scavengers. This entirely depends on where you live though. If you are in a suburb with lots of other houses, this trick might work, but if you are the only house around, you might want to make proper impenetrable defense around your property.
A good fence that is not easy to bypass will be a nice first line of defense. You should also consider security cameras to help keep you notified of who or what is coming onto your property
Not that I would ever encouraging harm to another human, but if you are in a life threatening situation you are going to want to consider adding some violent traps to your perimeter defenses. Sharpened wooden spikes will cause a massive amount of damage to an invader and should only be created when you are absolutely sure that it is necessary.
A good defense can not just save your life but it will also give you the peace of mind to be able to sleep at night when you know that your loved ones are safe and sound from any dangers that might be lurking outside of your carefully constructed perimeter defenses.