It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) forbade drinking water from waterskins by bending their mouths outward (and putting one's mouth to them). He said: After this prohibition of the Prophet (peace and blessings be upon him), a man came to a waterskin at night, bent its mouth back and began to drink, and a snake came out of it at him.
Imam Ibn Majah (may Allah have mercy on him) narrated it through Muhammad bin Bashshar from Abu Amir al-Aqadi.