What Does the Bible Say About Self Defense?

Jesus had told them to buy those swords that same night… so defense, not offense? Peter attacked the temple guard and got rebuked though, and Jesus healed the man.