This excerpt is taken from the book by Fazilat-ul-Sheikh Abdul Salam Rustami From Denial of Hadith to Denial of Quran.
Hadith 18: The Falsehood of the Denial of Hadith Regarding the Permissibility of Sodomy
There is much detail in this issue, but the conclusion is that in no authentic, proven, mursal hadith of the Prophet Muhammad ﷺ is the permissibility of وطيء فى الدبر (sodomy) with one's wife found. Rather, the prohibition is established. Imam Bukhari, may Allah have mercy on him, has narrated a concise statement of Ibn Umar, may Allah be pleased with them both,
Reference: Sahih al-Bukhari, al-Bukhari, Tafsir, Chapter: Your wives are a tilth for you, so approach your tilth however you wish, Hadith: 4528-4526
whereas the meaning of Ibn Umar’s statement is precisely that intercourse should be with the wife’s vagina.
Reference: See Sunan al-Kubra by al-Nasa’i, Hadith: 8978
Furthermore, a mursal hadith is transmitted from Ibn Abbas, may Allah be pleased with him, that the Messenger of Allah ﷺ said:
لا ينظر الله إلى رجل أتى رجلا أو امرأة فى الدبر
“Allah Almighty does not look at the person who has had intercourse with a man or woman through the anus.”
Reference: Jami’ al-Tirmidhi, Ar-Rida’, Chapter: What has been mentioned about the dislike of anal intercourse, Hadith: 1165
Imam Tirmidhi has narrated it, and narrations prohibiting sodomy have been mentioned in Musnad Ahmad, al-Nasa’i, Ibn Majah, and Ibn Hibban, who has declared this hadith authentic. Therefore, the proof lies in the mursal hadiths. In contrast to the concise statement of Ibn Umar, may Allah be pleased with him, the prohibition of this abominable act is established with great clarity, as mentioned with reference to al-Nasa’i. However, some people of the early Islamic era have unnecessarily written to pave the way for denying the hadith:
“After this, decide for yourself whether this interpretation can be attributed to the Messenger of Allah ﷺ and whether the Qur’an can be understood according to such hadiths.”
Reference: Maqam al-Hadith, p. 185