When he does that , grab his mouth and hold it shut for a few seconds and tell him NO in a very stern voice.

My ex used to bite my dog back and she finally stopped doing it . Im not saying to do that though.