President Donald Trump's lambasting of Federal Reserve officials for raising interest rates could backfire if the views of the central bank's former vice chairman are correct.

Stanley Fischer, who also was a governor of the Bank of Israel, said Thursday that the Fed might be tempted to raise rates even more aggressively to show that it can't be influenced by the White House.

"I don't think it helps at all, even if he thinks that. The Fed is going to try to demonstrate it's totally independent politically and it's not going to react to that," Fischer told CNBC's Sara Eisen during a "Squawk on the Street" interview.

"Then the question is, 'What do they do to show they're not reacting?' They could go either way," he added. "They could probably raise rates faster, which is not what he is exactly looking for."

Ultimately, the Fed likely will proceed with what it thinks is the best course of action regardless and not try to make any philosophical statements, said Fischer, who served on the bank from 2014-17.

"I believe this is a highly professional board. The Fed's board was chosen very well by the administration, and it's a good group of people and they will do what they know they have to do," he said. "They have to make a professional judgment and that should be what the interest rate should be and it should be totally independent of political pressure."

The policymaking Federal Open Market Committee has been raising rates in a gradual but steady manner since late 2015, with the most recent increase coming in September. Fed officials have said they are seeking to normalize rates to head off inflationary pressures and to ensure financial stability.

Trump has lashed out at the central bank on multiple occasions, most recently saying that rising rates are the "biggest threat" to the economic boom during his administration.

Earlier in the day, former Fed Chairman Alan Greenspan told CNBC that current Fed officials should "put earmuffs on" and ignore the political pressure. He added that he heard from presidents "all the time" about what monetary policy should be.

Fischer agreed with Greenspan's advice and said the Fed should not back down from the current policy path.

"The big problem is there are lags in this process. You raise interest rates now because of inflation you fear down the road. So it's very easy to say always, 'Yeah, they're premature,'" he said. "Well, they better be premature."