THE CURRENT rage over control of the internet brings to mind the ring of Gyges. An earthquake opened a crack in the earth’s surface. Gyges, a shepherd, entered and found the corpse of a giant wearing nothing but a golden ring. He found that when he twisted the ring, he became invisible.

He went to court, where he used his new power to seduce the queen, murder the king and take control of the kingdom.

Two and a half thousand years ago, in The Republic, Plato had the cynical Glaucon use the story of Gyges to conduct a thought experiment in an argument about whether people are naturally inclined to behave well.

Suppose, asks Glaucon, there were two rings like Gyges’s. Give one to an unjust and one to a just person. What would happen?

“No man,” says Glaucon, “can be imagined to be of such an iron nature that he would stand fast in justice. No man would keep his hands off what was not his own when he could safely take what he liked out of the market, or go into houses and lie with any one at his pleasure, or kill or release from prison whom he would, and in all respects be like a God among men.

“Then the actions of the just would be as the actions of the unjust; they would both come at last to the same point . . . for wherever any one thinks that he can safely be unjust, there he is unjust.”

In the 21st century, we don’t need shepherds and giants and magical rings to tell us this. We have the internet. Our ring of Gyges is a web address. A form of invisibility is available instantly to almost everyone. The anonymity of the internet gives each of us access to a realm beyond law and shame, where we can “safely be unjust”.

This is the condition that lies behind the current dilemmas of internet privacy, copyright, defamation and censorship.

The internet started out with a sheen of moral innocence. It was a new found land in which humanity could be washed clean of the sins of the past.

The assumption was that in this free space, people would behave honourably and ethically. As the natives might put it, LOL.

As a mass experiment in human nature, the internet has posed Plato’s question: how would we behave if nobody could know what we’re up to? The answer – or at least one credible answer – is not at all well. We don’t get to sleep with the queen or kill the king, but we do lots of other disreputable stuff. We comment with great vehemence on things we know absolutely nothing about.

We bully and abuse others, especially if they are female: sexist, racist and homophobic language pours out in torrents.

We spread slander with hardly a thought and with no limits, as the unfortunate student wrongly accused of dodging a taxi fare discovered. And we become rabid kleptomaniacs, stealing everything we can get our digital paws on – music, films, books.

If tables and chairs and clothes and food existed in a downloadable form, we’d steal those too.

There is another answer, too, of course. People also do great things online, like spreading knowledge and forming networks and organising revolutions. And some of these great things are, by force of circumstance, anonymous too. The ring of invisibility that allows you to kill the king is not necessarily a bad thing – there are good reasons why tyrants fear those who possess it.

Plato’s parable is, in this sense, far too simplistic. The actions of the just and of the unjust do not become indistinguishable under the cloak of invisibility. Sometimes, invisibility and anonymity don’t provoke bad behaviour, they actually enable justice.

Nevertheless, it remains sadly undeniable that the web shows us that decency is enhanced by rules and boundaries. And, conversely, that the absence of formal and informal sanctions (the law on the one side, and shame on the other) allows people to indulge their worst selves.

The lovely, blossoming, self-regulating anarchistic commune that many of its pioneers dreamed the web would become is a Garden of Eden from which we have long been banished.

That myth persists, though, and is now actually a big problem for online freedom. In resisting rules and boundaries, the online anarchists actually invite others – governments and corporations – to impose them.

They will impose them stupidly and hypocritically. Governments will try to crush dissent or, at best, do more harm than good. Corporations will play both sides of the idea of private property – your information is ours, but our content is not yours.

So who can make legitimate rules for the online world? Surely the vast but connected online community itself.

This is, after all, the basic principle of democracy: we obey the laws because we make them.

The time is right for a new social contract for the online republic that exists somewhere between naive anarchism on the one side and cynical control on the other.

If online citizens don’t want to be subject to bad laws, they must collectively make good ones.