Defense against such marauders is but one side of the coin. The other side of the coin is to take the offensive.
Hunt them down, and they'll head elsewhere where they're not hunted. Those that are not smart enough to do so become the live fire training exercises, aka NEPUTS.
Plus we have to consider that at the same time people would have to forage or grow, harvest and prepare food.
And forage for water, fuel, medications, ammo, etc. - whatever else it takes to survive.