It is not permitted unless you have the explicit permission from the Rav, and probably not even then. Do not ever think that your Rabbeim do not have feelings just like their talmidim. One must also consider how their spouses and children may feel. Stay away from it, there are plenty of other funny things to do.
Why is making fun of a Rabbi different than making fun of anyone else? If you have express permission from everyone possibly affected then it might be okay. Otherwise it’s absolutely Assur, regardless of whom you are making fun of.
Making of a Gadol implies that Purim plays were a way of allowing bochurim to vent their frustrations and feelings. He quotes from some famous plays on volozhin and slabodka.
one of my rabbeim, a close talmid of R Gifter ztl, told me that he was ok with leitzonus being made at purim shpiels.i guess he held it was ok. once when a talmid took it too far R Gifter stood up and yelled at him, “ploini, arois fun yeshiva!!” guess you have to know where it stops.