The Chief Rabbinate of Israel forbids ascending onto the Temple Mount, as indicated by the signs placed around the area. These signs were placed there at the request of Ha-Rav Ha-Gaon Yosef Chaim Zonnenfeld (Chochmat Chaim pp. 212-213).
Perhaps one will say: But there are others Rabbis who permit it under certain conditions, and "These and those are the words of the Living G-d" and either position can be followed! To this we respond: 1. There are different levels among Rabbis, and those who forbid it are the Gedolei Ha-Dor (the great Rabbis of our generation), and2. The Chief Rabbinate forbids it and they are the decisors in this case since it is a question for Klal-Yisrael. 3. Our Rabbis, Maran Ha-Rav Kook and Rabbenu Ha-Rav Tzvi Yehudah forbid it (see Shut Mishpat Cohain #96).
When Ha-Rav Hershel Schachter, Posek and Rosh Yeshiva in Yeshiva University, was asked his opinion regarding ascending onto the Temple Mount, he responded: As a Rabbi in the United States, I should not answer such a question. 1. One should follow the ruling of the Chief Rabbinate of Israel, who prohibits it. After all, Neturei Karta and Agudat Yisrael do not listen to the Chief Rabbinate. Only the Religious-Zionists listen to it, and if we do not heed its rulings we will bring about the collapse of the Chief Rabbinate of Israel. 2. A Rabbi in one location should not give a halachic ruling for another location (as Ha-Rav Moshe Feinstein stated: The Rabbi from Minsk should not interfere in questions of the Rabbi from Pinsk. Meged Givot Olam Volume 1, p. 55. Volume 2, pp. 31-32).
The Charedi Rabbis do not speak about the prohibition of visiting the Har Ha-Bayit because it is self-evident. Once when someone asked Ha-Rav Yosef Shalom Elyashiv about going to Har Ha-Bayit, and he responded: Chas Ve-Shalom (G-d forbid). The Gabbai then reprimanded the one who asked: You ask such questions to the Rav, dealing with Karet?! Rav Elyashiv replied: Even if there isn’t an issue of Karet, it is written (Bamidbar 5:3): "And do not defile their camps, in which I dwell among them" (Va-Yishma Moshe Volume 1, pp. 188-189).
It is related that immediately after the Temple Mount was liberated, the Steipler prepared a notice to publicize the severity of violating the prohibition of ascending onto the Har Ha-Bayit. The Steipler’s students gathered the signatures of leading Charedi Rabbis, but as it was about to be printed, the Chief Rabbinate publicized a notice with the signatures of leading Rabbis. The Steipler said that it was no longer necessary to print the notice since the prohibition had already been issued (Orchot Rabbenu Volume 1, pp. 324-328).
In sum, visiting the Temple Mount is an affront to both the Chief Rabbinate of Israel and Gedolei Yisrael.