Sunan Ibn Majah, Book 20, Hadith 79 (Ibn Majah 2613)

It was narrated from Abdullah bin Amr that the Messenger of Allah (ﷺ) said:

“Whoever claims to belong to someone other than his father will not smell the fragrance of Paradise, even though its fragrance may be detected from a distance of five hundred years.”