By arresting the pirates, maybe? As has just happened to Mr. Dotcom in his New Zealand hideout. It is the online pirates who actually restrict freedom, by making it necessary to take measures to stop them.
By the same reasoning, I gladly go through airport security. It constricts my freedom, but I find it preferable to allowing unrestricted terrorism, as if that would make my life freer.
so simply providing a service to share files is piracy??
(I am not talking about Mr. Dotcom, but in general...)