Sending Out from the Camp
The mitzvah of sending out from the camp, "Command the children of Israel that they send out of the camp every leper and everyone who has an issue," is a mitzvah incumbent upon the Jewish people to expel from the Temple Mount all those who are impure and forbidden to enter there. If impure people transgressed and entered, they have violated a negative commandment. For all the rabbinic prohibitions, the punishment is *makas mardus* (rabbinic lashes).
Machaneh Yisroel
1. From the walls of Jerusalem. From there inward, a *metzora* (leper) is forbidden to enter.
Machaneh Leviyah
2. The Temple Mount. *Zavim*, *zavos*, *niddos* and women after childbirth are forbidden to enter the Temple Mount. However, one impure from contact with a *sheretz* (creeping creature), and even one impure from contact with a corpse, is permitted to enter the Temple Mount.
3. The Cheil. Even non-Jews and those impure from contact with a corpse are forbidden to enter there, but a *tevul yom* is permitted.
4. The Ezras Nashim. By rabbinic law, even a *tevul yom*, meaning a *baal keri* who immersed that same day, is forbidden to enter there. (Rashi and Tosafos disagree: according to Rashi it is a positive commandment that does not carry *kares*, and according to Tosafos it is rabbinic.) However, a *mechusar kippurim* (one still lacking his atonement offering) whose sun has already set is permitted.
Machaneh Shechinah
5. The Ezras Yisroel. Even a *mechusar kippurim* is forbidden to enter there. The punishment is *kares* according to the Raavad, and *makas mardus* according to the Rambam[1]. However, for other impure people the punishment is *kares* according to all opinions.
Partial Entry
There is an opinion that partial entry is considered entry. That is, even someone who put his hand into the Temple Mount or the Beis HaMikdash is considered to have entered there. In practical halachah, the Raavad rules that partial entry is considered entry. The Rambam, however, holds that this is not the law on a Torah level but only rabbinically, and the punishment for it is *makas mardus*[2].
In Our Times
Although, according to the above, there are places on the Temple Mount that one who is in a state of complete purity is permitted to enter, nevertheless the Rebbe instructed that one should not ascend the Temple Mount at all in our times, and the matter should not even be considered. One of the reasons for this is that if ascending the Mount were permitted, it would lead to people who are not pure ascending, and this would result in a great breach.