Simon has already explained the difference between ‘needn’t’ [need not] and ‘oughtn’t’ [ought not].
However I think that the contraction ‘oughtn’t’ sounds slightly strange, and that we would more likely say ‘ought not’, although the others - ‘mustn’t’ and ‘needn’t’ - sound natural.
Another variant is ‘shouldn’t’ [should not] which is equivalent to ‘ought not’, and probably more commonly used.