Are there any Mantra, Stotra, shloka for protecting oneself, from internal and external foes.
The Sanskrit word "Raksha" means "protection".
So, the Stotras which immediately come to mind are the Shiva Raksha Stotra by Rishi Yajnvalkya and the Rama Raksha Stotra by Budha Kashika. The Stotras are so called because if chanted they protect the aspirant in every way.
Both these are like protective armours (Kavacha Stotra).
Quoting from the Shiva Raksha Stotra's Phalasruti:
Yetham shiva balo petham., raksam ya sukruthee padeth,
Sa bhukthwa sakalan kaamaan, shiva sayujyamapnuyath,
Graha bhootha pisachadhya, trilokyepi charanthi ye,
Dhoorad aasu palayanthe Shiva namabhi rakshanath., 9
That blessed one who reads this protection, Which is blessed with power of Lord Shiva, Would get all his desires fulfilled, Attain nearness to Lord Shiva after death, And planets, ghosts and ghouls, Which travel in any of the three worlds, Would run immediately, far, far away, Due to the protection given by names of Shiva.
Abhayam kara namedham kavacham Parvathi pathe,
Bhakthya bibarthee ya kande, thasya vasyam jagat thrayam,
Imam Narayana swapne Shiva Raksham yadha disath,
Prathar uthaya yogeendro, Yagna valya sthadha likath., 10
This armour of the names of the consort of Parvathi, Would remove fears and provide protection, To the devotees who sing these often, And the lord of the three worlds would be within his hold, For this protection of Lord Shiva was revealed, By Lord Vishnu in the dream to Yagna Valkya, Who wrote it, as he was told, as soon as he woke up in the morning.