Hammers fans taunted Terry with chants about his family, while Lampard is targeted having left the club for Stamford Bridge eight years ago.
The pair had the last laugh during Saturday's Barclays Premier League win over their London rivals, and they celebrated in front of the Bobby Moore Stand when Salomon Kalou struck the winner.
Objects from the crowd were thrown in the direction of the pair and referee Mike Dean spoke with Terry to ensure he did not incite home supporters, but the England skipper feels fans should take stick if they dish it out.
"When we scored, I went running over to Lamps and gave them a bit back," Terry said. "There's nothing wrong with that.
"The referee had a quiet word with me and said, 'Don't wind them up'. But if they can give they can take it, and if I can take it I can give it. That's the way it's got to be.
"They have to expect a bit back. When they do get a bit back they all get the hump a little bit. But that is football. I'll take it the rest of my career and I'll certainly give a bit back in my career."
Terry's family, who are West Ham fans, stayed away from the match after learning through the internet the abuse the 28-year-old would suffer.
Hammers supporters have not forgotten that Terry spent five years with their academy before joining Chelsea as a 14-year-old.
Terry, when asked if fans cross the line, added: "I think they do, personally. I can take it, Lamps can take. It's a little bit more than that but I'm not going to give them a chance to say I'm whinging.
"Walking home with three points and them walking home with nothing, you can't buy that and they can't buy that.
"As a player coming here, knowing you are going to get stick, I swear me and Lamps are so fired up before the game and determined.
"When you get that stick you just want to prove them wrong and shut them up. I think we did that."
Kalou's winner from Lampard's cross and Petr Cech's penalty save from Mark Noble was the perfect way to prepare for Tuesday's clash against Barcelona in the last four of the Champions League.
With Ashley Cole suspended, Jose Bosingwa auditioned for the left-back role to mark Lionel Messi at the Nou Camp, while centre-back Ricardo Carvalho will miss the trip.
Chelsea boss Guus Hiddink has been carefully preparing for the match
"I have played this Barcelona game twice in my head," said the Dutchman. "In my head I have never lost a game in the preparation."
West Ham boss Gianfranco Zola, who has agreed a new contract until 2013, feels Lampard and Terry could be Chelsea legends like he is if they get past Barca.
"For me Chelsea fans are fantastic supporters and I hope they can give the same respect and love they gave to me to someone else," Zola said.
"Hopefully that will be people like Frank and John Terry because they love the club and they do it very well."