Today I came across the Teretegenic (sp)? table, that outlined the categorisation of sexual activities in the Roman world, in it, it states that to be penetrated in the anus or to give oral sex is frowned upon and hated.
So, my question is, how did the relationships between an older and younger men work if the two categories they could do were frowned upon? and, was it frowned upon to give anal sex/receive felatio?
The problem is that you are thinking in modern and English-language terminology. Roman sexual mores are orientated on a different axis, and participants in sexual acts are not equal.
Generally the two questions are: who is the 'active' partner, and who is the partner of higher social status? In general the higher social status partner will be the 'active' partner.
And by 'active' here I mean "performs the penetrative act". So in the case of anal sex, the one who is penetrating is fine. The one who is being penetrated is in a position of shame. Which is why most higher-status Romans, if engaged in homosexual sex, would perform this on someone of significantly lower status, slaves for example, who have no power/leverage to either reject the act or to do anything socially about it.
In the case of fellatio, we tend to think that the fellator is the active persion, the person fellated is the passive person, but the classical conception is reverse. The person being fellated is in fact the 'active' partner, because they are penetrating the other person's mouth. The same social dynamic exists as with anal sex.
This, of course, was why, if you were a relatively high status person, being accused of receiving anal sex or performing fellatio was an accusation of shame and dishonour. No one cared whether you liked/enjoyed that role in sexual activity, the functional category was the honour/shame of your participation.
Hey! You're talking about the teratogenic grid, as expanded on by Holt N. Parker in Skinner and Hallett's Roman Sexualities. It's one of my favorite books to recommend, but your confusion is really understandable as this particular essay within the book is a bit dense for laymen. Incredibly useful, but dense.
As others have stated - by just conceptualizing certain sex acts as "accepted" versus "frowned upon" you're kind of misreading the point of the grid. The point of the grid is to break our modern habit of judging everyone's sexuality on our modern spectrum of gay to straight, and instead shifting the focus to an active-to-passive spectrum on one axis of the grid, with gender on the other axis.
So what you're thinking of as "frowned upon" wasn't, really. As long as a man (on the gender axis of the grid) was staying in the penetrator role (on the active/passive axis of the grid) he was perfectly within the bounds of the Roman conceptualization of sexual morality. It didn't matter whom he was penetrating, as long as he remained in the active role, in the correct part of the grid.
So the second part of your question is, I think, a matter of confusion between Roman and Athenian sexualities. The relationship you're describing, between a much older man and a much younger boy, was the "eromenos/erastes" relationship, characteristic of a certain time period in Classical Athens. While this is not my area of specialty, I will say that I do know enough to point out that it was not acceptable for any anal sex to happen within this relationship. Instead, the typical sexual expression of this relationship (which encompassed more than sex and was kind of a mentor/mentee relationship) was intercrural sex or manual sex (i.e. handjobs).
Not flaired, but I did get my MA in Roman social history. /u/Horatioooo and /u/talondearg are right on in both their posts. I just wanted to add a couple of reading suggestions if you're interested in this topic; Amy Richlin's The Garden of Priapus, especially the early chapters, gives a good analysis of this system and how it influenced Roman humor, and Craig Williams's Roman Homosexuality, which is a good all-purpose investigation into sexual relationships between men (mostly) in the Roman world.