A playing ferret may run at you with his mouth open or even put his teeth on your hand, but if he presses down hard enough to hurt, you need to discipline him. Just remember, ferrets aren’t malicious, they just need to learn what behavior is acceptable. A very few otherwise calm, gentle ferrets will react in an extreme way to a high-pitched noise such as a squeaky toy (perhaps only one particular toy) or the sound of rubbing fingers on a window or a balloon. Nobody’s quite sure why that sets them off, though it seems to be a protective instinct of some sort. If your ferret is one of those few who bites wildly at the source of such a sound, my best advice is, don’t make that sound around them.
Sometimes a ferret which has been mistreated will bite out of fear, or an older ferret might bite because of pain, either in the mouth or elsewhere. In either of these cases, strict discipline isn’t going to do any good. For an animal in pain, of course, take it to the vet. For an abused ferret, try one of the alternatives mentioned below, and have a lot of patience: the ferret has to learn to trust someone when all it has known before is abuse. In all cases, positive reinforcement (giving treats and lots of praise when the ferret does well) works much better than punishment, but if you need one, use a "time out" for a few minutes in a cage or carrier. Similarly, don’t set the ferret down when he struggles and nips – you’ll be teaching him that that’s the way to get what he wants.
Finally, whichever method you use, consistency and immediacy are very important. Flicking the ferret’s nose while his teeth are on you is a pretty common form of discipline, but it might not be the best. Your ferret might end up associating you with bad things rather than good ones. Also, it’s a very bad idea to use nose-tapping or other physical discipline on a ferret who has been mistreated or who acts unusually aggressive or frightened.
There are several alternatives, which you might want to try in combination: If the ferret is biting too hard in play, try using a signal he already understands: a high-pitched "Yip!" (or "Hey!" or whatever), like the noise one kit makes when another is playing too roughly. On the other hand, if the ferret seems to interpret that as a sign of weakness, switch to a deep, commanding voice and act as stern as you can. Stopping the game by gently pinning the ferret down until he gets bored can work well, too.
Confining the misbehaving ferret to a cage and ignoring him for a few minutes can be very effective, especially if there’s another ferret wandering around conspicuously having fun. You can cover your hands with Bitter Apple, either the spray or the paste, so nipping tastes bad. Some people have had good luck with either pushing a finger into the ferret’s mouth (sideways, behind the back teeth) or holding the mouth open from behind (being careful not to choke the ferret) immediately after a bite. Most ferrets find either of these uncomfortable, and it associates the unpleasant feeling with the taste of finger.
If you need the ferret to let go, try covering both his nostrils with your fingers. If he still hangs on, don’t keep them there long, though. If the ferret isn’t one of those who absolutely hate to be scruffed, that can help. You might also shake the ferret gently by the scruff, or drag him along the floor while you hiss. Both these mimic the way mother ferrets reprimand their kits. Obviously, don’t be so rough that you hurt him. You can also cover his face with your hand, which he probably won’t like.