Police are to get powers to force internet firms to hand over details that could help identify suspected terrorists and paedophiles.
The Anti-Terrorism and Security Bill will oblige internet service providers (ISPs) to retain information linking Internet Protocol (IP) addresses to individual users.
Home Secretary Theresa May said the measure would boost national security.
She said: "The Bill provides the opportunity to resolve the very real problems that exist around IP resolution and is a step in the right direction towards bridging the overall communications data capability gap.
"It is a matter of national security and we must keep on making the case for the Communications Data Bill until we get the changes we need."
However, the Lib Dems insisted that legislation - branded the "Snooper's Charter" - was "dead and buried".
Tougher penalties for those convicted of online 'trolling' were announced by a government minister at the end of September.
The changes set out by Justice Secretary Chris Grayling in today's Mail on Sunday have been long-standing government policy, with Justice minister Lord Faulks confirming this in a speech on September 25th.
The proposals are the work of Tory backbencher Angie Bray, who tabled an amendment to the Criminal Justice Bill in March.
The new welcome stress on changes to the law to tackle cyber bullies comes from my amendment to the criminal justice bill re malicious comms
Internet 'trolls' could face a maximum sentence of two years in jail under tougher new legislation.
The amendment to the Criminal Justice Bill would mean the most serious cases could be tried in the Crown Court, where sentences could be four times the current maximum of six months.
But a Labour MP who has been a victim of trolling told ITV News the police should be making better use of existing laws to crack down on abuse and harassment.
ITV News Correspondent Ronke Phillips reports.
Chloe Madeley says was left frightened by the threats she received on social media in the wake of her mother's controversial comments about convicted rapist Ched Evans.
In a statement to ITV News, the TV presenter welcomed proposals for tougher sentences for internet trolls but warned more needed to be done to combat the "persistent" abuse.
I have been abused on social media for years, yet I have never taken it seriously as I agree that once you decide to enter the public eye, you are fair game.
However, threats of any kind must not be interpreted as freedom of speech.
Threatening to harm others is extreme and crosses the line of personal opinion into criminal behaviour. The tweets I received this week were frightening, persistent, violent and sadly, far too easy to make on a public forum. I am pleased the government are now talking about ways to deter trolls, and quadrupling the sentencing is a good place to start.
Justice Secretary Chris Grayling has pledged to deliver stronger sentences against internet trolls who are "poisoning our national life".
Unveiling plans to jail offenders for up to two years, Grayling told the Mail on Sunday: "These internet trolls are cowards who are poisoning our national life.
"No-one would permit such venom in person, so there should be no place for it on social media.
"That is why we are determined to quadruple the current six-month sentence."
Chloe Madeley has welcomed plans to toughen laws to tackle internet trolls.
Ms Madeley, a fitness instructor, was threatened with rape after intervening in the row over her mother's comments about convicted rapist footballer Ched Evans.
Finnigan had inflamed the debate about whether Evans should resume his footballing career by saying his crime was "not violent" and did not cause "bodily harm" during a panel discussion on ITV's Loose Women.
Ms Madeley told the Mail on Sunday it was right for Mr Grayling to update the 10-year-old law.
"The current law obviously needs to be reviewed," she said. "It needs to be accepted that physical threats should not fall under the 'freedom of speech' umbrella. It should be seen as online terrorism and it should be illegal."
Internet trolls will face up to two years in jail under tough new laws proposed by Justice Secretary Chris Grayling.
The previous maximum term of six months will be quadrupled under the plan to tackle the "cowards" who post abusive comments online.
Mr Grayling said the plan was a signal of his determination to "take a stand against a baying cyber-mob".
The move comes just days after the threats directed at Chloe Madeley after she stepped in to defend her mother Judy Finnigan's controversial comments about footballer and convicted rapist Ched Evans.
The Justice Secretary told the Mail on Sunday: "These internet trolls are cowards who are poisoning our national life."
The House of Commons will debate whether sharing explicit images of an ex after a break-up to 'get revenge' should be a criminal offence.Read the full story ›
BT have been ridiculed on Twitter today after thousands of frustrated customers complained about internet outage.
The technical problem lasted several hours, prompting angry users to post tong-in-cheek complaints on social media.
The company, which provides broadband to seven million UK subscribers, said it was unable to say how many customers had been affected.
Folks with BT internet. It's a beautiful day outside, go frollick in the sun instead of... oh wait, you can't read this...
Glad it wasn't just me who was having BT broadband issues. No wifi 2 hours, thought my life was over, almost got out the Scrabble.
A BT spokeswoman said the problem has now been fixed. "There were problems with our broadband service earlier today but they were resolved. We're sorry for any inconvenience this may have caused," she said.