Al-Kāfi

Hadith 71
wudu
3ـ مُحَمَّدُ بْنُ يَحْيَى بِإِسْنَادِهِ رَفَعَهُ قَالَ سُئِلَ أَبُو الْحَسَنِ (عَلَيْهِ الْسَّلام) مَا حَدُّ الْغَائِطِ قَالَ لاَ تَسْتَقْبِلِ الْقِبْلَةَ وَلاَ تَسْتَدْبِرْهَا وَلاَ تَسْتَقْبِلِ الرِّيحَ وَلاَ تَسْتَدْبِرْهَا. وَرُوِيَ أَيْضاً فِي حَدِيثٍ آخَرَ لاَ تَسْتَقْبِلِ الشَّمْسَ وَلاَ الْقَمَرَ.
3. Muhammad ibn Yahya through the chain of his narrators in a marfu‘ manner has said the following: “Abu al-Hassan (a.s.), was asked about (one’s condition) when defecating. He (the Imam) said, ‘One should not face the direction of al-Ka‘bah, turn one’s back toward al-Ka‘bah, face the direction from which wind blows or turn one’s back to such direction.’” It is narrated in another Hadith that one should not face toward the sun or moon (when using the toilet).
Source: Shaykh Muḥammad b. Yaʿqūb al-Kulaynī