Definitely don't go front to back... it can cause various infections, etc.
Usually we see this with anal sex, where the guy will insert his penis or the toy in the anus and then in her vagina. Don't do it!
The danger here is bacteria in feces, so really licking around the anus can still have some of the problems of going "in".
So on licking... ideally you really should avoid licking the anus, although the mouth is somewhat resilient (saliva is first part of our digestive system) it's really not a good idea because of the aforementioned bacteria - plus you're probably not going to go was your mouth out with soap. :-)
Quick way to remember this: if it goes in the butt, you wash it out with disinfectant soap (or better yet, throw away the condom and was your hands with disinfectant soap - for these same reasons we always recommend a condom for anal penetration).