Question: Does the Bible allow for defending oneself or one's family?
Response: There is no teaching in Scripture that forbids self-protection. There are, however, special conditions in which such an effort may not be what God desires. The Old Testament abounds with examples of armies and individuals raised up for the defense of Israel. David, as a young man, took on the Philistine giant Goliath for the glory of God and the protection of Israel. Gideon and Deborah, among other judges, were also used of God for the protection of Israel. Yet many of the prophets of Jehovah were martyred for speaking what He told them to say.
In the New Testament, we're told that governments restrain harm against their people by bearing arms "to execute wrath upon him that doeth evil" (Romans:13:4). Soldiers were exhorted by John the Baptist to repent of intimidating and extorting people; they weren't told to leave their occupation. Jesus commended the Roman centurion for his faith, with no indication that his profession was unbiblical. Paul used military analogies throughout his Holy Spirit inspired writings. There are far too many scriptures that cannot be reconciled with pacifism.
Other than fashioning a whip and chasing the moneychangers from the Temple, Jesus never acted in an aggressive militant way. Neither did He defend Himself beyond eluding those who wanted to destroy Him prior to His going to the Cross. His mission at His first coming was as the meek and lowly Lamb of God, who came to sacrifice Himself to pay for the sins of humanity. On the other hand, at His second coming He will protect Israel as He rescues her by destroying the armies of the nations that have gathered to destroy her. "And I saw the beast, and the kings of the earth, and their armies, gathered together to make war against him [Jesus] that sat on the horse, and against his army....And the remnant were slain with the sword of him that sat upon the horse, which sword proceeded out of his mouth: and all the fowls were filled with their flesh" (Revelation:19:19, 21).
When Jesus was physically with His disciples, He kept them out of harm's way. Just as when He sent out the twelve apostles and the seventy disciples and empowered them, He would miraculously be their provider and protector. His disciples were never told to form themselves into an army for their own or His protection, or to take over Israel and the world for Christ. However, just before Jesus went to the Cross, He indicated that His followers would need to do some things in His physical absence. "And he said unto them, When I sent you without purse, and scrip, and shoes, lacked ye any thing? And they said, Nothing. Then said he unto them, But now, he that hath a purse, let him take it, and likewise his scrip: and he that hath no sword, let him sell his garment, and buy one. For I say unto you, that this that is written must yet be accomplished in me, And he was reckoned among the transgressors: for the things concerning me have an end. And they said, Lord, behold, here are two swords. And he said unto them, It is enough"(Luke:22:35-38). Peter missed the point on two counts: first, the necessity of what Jesus must suffer when he tried to hold back the mob coming to take Jesus by force, and second, that they should be reasonably armed and only when conditions warranted it.
Some Christians believe that it shows a lack of faith to arm oneself even in the face of imminent danger. To be armed is to not trust God as one's protector, or so I'm told. I certainly trust God as my protector. I also trust God as my provider, yet I work. I trust God as my healer, yet I go to the doctor. The same holds true for protection. I look to the Lord ultimately to protect me and my family, yet there may be a time when arming myself for their protection is the prudent thing to do. It may be a matter of simply deterring wickedness, or more actively preventing the rape or murder of one's loved ones.
There also may be a time for a believer to give up his life for the testimony of the gospel and for Christ, just as Stephen, all the apostles except John, and the martyrs who are cited in Hebrews 11. How do we know when to defend ourselves and when not to? "The just shall live by faith" (Romans:1:17). It's a matter of scriptural conviction and being led of the Lord.