All of this communication typically takes place over encrypted TLS. I don't see how you can determine what is "illegal" or what is not illegal without some sort of TLS intercept going on, which no one is going to stand for.
Identifying content without introspection is just going to not work at all. This being said, it may be within your means to block "pirate" sites based on DNS or destination IP, but I wouldn't remotely approach that in a preemptive way. That's just censorship pure and simple.
If you actually got a court order to block a site, that's a different story but I would not do this in a preemptive way.