Ravana was a devotee of God Shiva.And it is believed that Ravana obtained boons from God Shiva, after doing penances. What are the various boons given to Ravana by God Shiva?
One story of Lord Shiva giving boons to Ravana is mentioned in Uttar Kand of Ramayana.
After defeating his elder brother Kubera, Ravana is passing through Kailash mountain in Pushpak viman. Then by the effect of pride, he lifted the Kailash mountain that trembles Goddess Parvati and other Ganas. Then Lord Shiva pressed the mountain by his toe and that struck Ravana's hands. In pain, Ravana has praised Lord Shiva. And finally Lord Shiva pleased with him and give
But without heading Nandi s speech, that highly powerful one Dasanana coming to the mountan, said, O Gopati, I will even uproot this mountain, for whom Pushpaka was deprived of its motion as I was journeying.
It must be known by what inluence Bhavaswara spoteth here king like. He doth not know that an occasion of fear hath presented itself? Having said this, O Rama, Ravana seizing the mountain with his arms, lifted it up at once; and then the mountain trembled greatly. And in consequence of the mountain shaking the attendants of the deity (dwelling in it) also shook.
And Parvati also trembled and embraced Maheshvara. And then, O Rama, Mahadeva foremost of the deities even Hara, as in sport pressed the mount with his great toe. And thereat his arms, resembling blocks of stone felt the shock and then there the councilors of that Raksha were struck with amaze.
And the Raksha, from wrath and the pain felt in his arms, set up a shout that shook the entire triune world. And his councillors considered it as the concussion of the thunder at the universal disruption. And then the Devas with Indra at their head shook on their way; and the sea was wild and the mountains shook.
And Yakshas and Vidyadharas and Siddhas asked, What is this. Do thou propitiate Uma s lord the blue throated Mahadeva; for, O Dasanana, save him thy refuge see we none in this matter. Bowing thyself down, do thou seek him as thy shelter.
Then the kind Sankara, on being gratified, will confer on thee his favor. Thus accosted by his councillors, the Ten faced one, bowing down to him having the bull for his standard, began to hymn him with various Soma hymns; and the Raksha passed away a good thousand years in lamentations. And thereat that Lord Mahadeva, pleased, set free the hands of Dasanana stationed at the top of the mount, and O Rama, addressed him, saying, O Dasanana, pleased am I with thee on account of thy hymns.
Thus accosted by Sambhu, Lanka s lord said of himself. If thou art pleased with me, grant me a boon, who ask thee for it. I have already obtained a boon, bestowing on me immunity from death at the hands of Devas, Gandharvas and Danavas; and Rakshasas and Guhyakas and Nagas; and others also that are of more than oridinary strength.
Man count I not O god :They, I deem, are insigniicant. I have also, O destroyer of Tripura, received a long lease of life from Brahma. Now I wish to pass the remainder of my days in peace: and do thou grant me a weapon.
Thus addressed by him, Ravana(,) Sankara gave him an exceedingly effulgent sword, famed as Chandrahasa; and the master of spectres then also granted him peace for the rest of his life. And making (the sword) over to him, Sambhu said, Thou must not disregard this. If disregarded, it will for certain come (back) to me Having thus received his name from Maheshvara, Ravana, saluting Mahadeva, ascended Pushpaka.