Mandodara and Gundodara are the divine gate keepers of Lord Vinayaka, and they are sincerely serving him in the Ganesha Loka. During the first Krita Yuga, both of them were born as demons, and they were brothers. When the holy Prahalada ruled over almost the entire earth, both of them were serving under him as Army Heads.
They got an opportunity to know about the significance of the gods from their master Prahalada, and as per his advice, they began to worship Lord Vishnu and Lord Vinayaka. In course of time, they developed strong faith and bhakti on Lord Vinayaka, and become his sincere devotees.
On seeing their sincere bhakti, Prahalada had discharged them from their duties and responsibilities, and asked them to do severe penance on Lord Vinayaka. They also went to the holy mountain Himalayas, and performed penance on Lord Vinayaka, for several years, even without taking food and water. In appreciation of their strong bhakti, one day, Lord Vinayaka had appeared before them, smiled on them, and asked them for boons.Both of them were very happy on seeing the divine vision of Lord Vinayaka, and they asked him to keep them in the Ganesha Loka as the Divine Keepers. Lord Vinayaka had granted the boon to them, and from then onwards to till date, they are eagerly serving their Lord, the First God Vinayaka, with full of devotion in their mind.
Though in ancient periods, most of the demons were given great trouble to the demigods in the heaven, yet some pious demon kings lived a noble life, like Prahalada, Mahabali and Vibhishana. Due to their attachment with their beloved gods, they have removed their bad habits and they have become good persons. As per the legend, those who read this nice story of the DwaraPalakas of Lord Vinayaka, would get all kinds of prosperity in their lives, and they would succeed in their career path.