In my opinion, if someone hits you, you automatically have the right to hit them back any way you want. It's self defense. Even though the problem is solved keep this in mind.
Not according to a teacher's logic:
If you some punches you in the face, don't you dare fucking hit back, you come and tell us and we'll have a talk with them and a suspension while you're stuck with a bloody, broken nose and a few loose teeth. Oh, and have fun when the bully comes back and bashes your head in twice as hard after school.
It's self defense. I still don't get why teachers are against that.