A mass rally in Moscow and similar demonstrations in two other cities were called after parliament backed the controversial bill last month.
The government says the bill, which allows it to isolate Russia’s internet service from the rest of the world, will improve cyber-security.
But campaigners say it is an attempt to increase censorship and stifle dissent.
Activists say more than 15,000 people gathered in Moscow on Sunday, which is double the estimate given by the police.
Some protesters chanted slogans such as “hands off the internet” and “no to isolation” while others gave speeches on a large stage.
“If we do nothing it will get worse,” one protester told Reuters news agency. “The authorities will keep following their own way and the point of no return will be passed.”
Another campaigner, Sergei Boiko, told AFP news agency that “the government is battling freedom”.
“I can tell you this as somebody who spent a month in jail for a tweet,” he added.
Opposition figures said that a number of protesters were detained in Moscow, but the police have not confirmed this.
One correspondent for AFP reported seeing a man being dragged away from the rally by his arms and legs.
The government says the so-called digital sovereignty bill will reduce Russia’s reliance on internet servers in the United States.
It seeks to stop the country’s internet traffic being routed through foreign servers.
A second vote is expected later this month.
If it is passed it will eventually need to be signed by President Vladimir Putin.
Russia has introduced a swathe of tougher internet laws in recent years. On Thursday, its parliament passed two bills outlawing “disrespect” of authorities and the spreading of what the government deems to be “fake news”.
And last year, campaigners took to the streets to protest the media watchdog’s attempt to shut down the encrypted messaging service, Telegram.
Russia’s main security agency, the FSB, said at the time that Telegram was the messenger of choice for “international terrorist organisations in Russia”.