Not explicitly illegal, but there's case law that could be leveraged by those with the balls (and money) to do so–Marsh v. Alabama.
"…the Court held that the property rights of a private entity are not sufficient to justify the restriction of a community of citizens' fundamental rights and liberties."
TL;DR; lady tried to hand out JW lit in a company town, got BTFO. Took it to SCOTUS, SCOTUS ruled that the Bill of Rights takes precedence, especially on private property open to the public.
Servers on the internet are for all intents and purposes company towns open to the public, and should therefore be subject to this ruling.