Deputy Prime Minister Nick Clegg has said his party will continue to oppose a so-called "snoopers' charter".
David Cameron has said the intelligence services need new powers to store and read the contents of communications in the wake of the attacks in Paris.
Mr Clegg said privacy was a "qualified right" but such a response was not proportionate and would "cross a line".
The Liberal Democrats blocked plans for a communications data bill - dubbed the snoopers' charter - in 2012.
At the time Mr Clegg said plans to store details of everyone in the UK's online activity would not happen while his party was in government.
The prime minister has raised the possibility of the plans being revived if he is still in Downing Street after the general election, as well as measures to break into the encrypted communications of suspected terrorists.
Speaking on Monday, Mr Cameron suggested it was unacceptable for the state not to be able to view communications on emerging platforms in extreme circumstances since a government's first duty was public safety.
The Lib Dems are among those to have raised concerns that this could lead to mobile messaging apps such WhatsApp and SnapChat - which allow users to send images and videos that "disappear" seconds after being viewed - being banned if the authorities cannot get access to them.
Mr Clegg said he backed targeted measures to identify suspected extremists and if necessary examine their communications, saying the state had always reserved the right to "steam open a letter" if it thought those behind it meant harm to others.
But he told BBC Radio 4's Today programme that one element of what Mr Cameron was proposing would go much further and would involve "scooping up vast amounts of information on millions of people - children, grandparents and elderly people who do nothing more offensive than visiting gardening centre websites".
"Privacy is a qualified right. If someone wants to do us harm, we should be able to break their privacy and go after their communications," he said.
"But the snoopers' charter was not about intercepting communications.
"It was about storing a record of all your social media activity, of every website you have visited of every single individual in this country, of people who would never dream of doing anyone else any harm, would never dream of becoming a terrorist or having anything to do with extremist ideologies.
"The question we need to ask ourselves, in a free, open society as we defend our values against the abhorrent attacks we saw in Paris, is where do you draw the line?"
- Draft Communications Data Bill 2012 - Would have extended the range of data communications companies have to store for 12 months. It would have included, for the first time, details of messages sent on social media, webmail, voice calls over the internet and gaming, in addition to emails and phone calls. Officials would not have been able to see the content of the messages without a warrant. The bill, dubbed the "snoopers' charter" by critics, was blocked by the Lib Dems.
- Data Retention and Investigatory Powers Act 2014-15 - Introduced as emergency legislation to maintain the requirement for phone and internet companies to log records (but not content) of calls, texts and internet use.
- Counter-Terrorism and Security Bill 2014-15 - Part of the bill going through Parliament would add to the Data Retention and Investigatory Powers Act to allow internet protocol (IP) address matching. This would identify the individual or the device that was using a particular IP address at any given time.
The Lib Dems have backed other counter-terrorism data measures, including maintaining the obligation on phone and internet companies to log records - but not the content - of calls, texts and internet use.
Mr Clegg has also supported legislation currently being debated by Parliament which would make it easier for the authorities to match the IP addresses of internet browsers with the devices used.
But Mr Clegg said targeting "dark spaces" on the internet was very different from tracking the communications of everyone in the country, which he suggested was simply not workable.
The UK's information watchdog has warned of "knee-jerk reactions" in the wake of last week's atrocities in France.
Information Commissioner Christopher Graham said "cool heads" were needed amid calls for the security services to have greater access to personal data.
"I am concerned about any compromising of effective encryption for consumers of online services," he said in a speech in Liverpool. "Every week we hear about cybercrime and online services being hacked.
"Citizens, businesses and nation states need to protect themselves. Internet companies are understandably offering their customers online services that are better encrypted following recent security incidents."
But London Mayor Boris Johnson, a Conservative, said it had to be recognised that advances in technology meant it was much harder for the authorities to keep pace with "people who mean us harm".
"You have to wonder whether in the future, or indeed at present, whether there are communications taking place that are impossible for our services to reach under the current law and whether we could make that interception easier," he told Today.
For Labour, shadow home office minister Diana Johnson told the BBC's Daily Politics that the debate between security and liberty had become "too polarised" and it was essential politicians waited for a review of existing powers being undertaken by watchdog QC David Anderson before acting.