If you are referring towards guys (being gay) i know Quran is so against to this act. In Sharia Law you get hundreds of whiplashes even getting stoned to death. Depends on if your are married or not.
But if you are talking about anal sex with your wife i guess you can get this part for a reference...
"Your wives are as a tilth unto you; so approach your tilth when or how ye will; but do some good act for your souls beforehand; and fear God. And know that ye are to meet Him (in the Hereafter), and give (these) good tidings to those who believe."
So basically its saying that your woman is your virgin (untouched, sacred) land, you can do whatever you want with her.