Of course you are. Just how you're allowed to fight and harm/injure/kill the enemy on a field of battle, you're allowed to fight in self-defense. When "boxing" is mentioned, it refers to the sport, not the act of boxing and punching.