Therefore the wall means the connection between all egoistic desires, which take the obligation to be interconnected altruistically, spiritually upon themselves. Thus, the presence of the wall meant that there could be no egoism inside the city. Otherwise it’s not a city.
As for the gates, as a rule they open and close so that you can accept something or it is impossible to keep it in yourself and you need to let it out of the city.
In the language of Kabbalah, this can be represented as a screen (Masach). If you work for the sake of bestowal, then it lets the light of the Creator’s delight into your desires. If not, then the gates are closed.
Comment: It is interesting that one of the gates in the city wall of Jerusalem was walled up. They say they will open in the future.
My Response: This is the Moshiach Gate.
From KabTV’s “Spiritual States” 2/22/22