Until a few days ago, Rep. John B. Anderson was a mouse that roared in presidential politics.

No one paid any attention to him. No one worried about what he said or did. He simply wasn't a factor in the race for the Republican presidential nomination.

Almost overnight, all that has changed. Anderson, the fiery congressman from Rockford Ill., has suddenly become the central figure in the March 18 Illinois GOP primary. It seems everyone wants to jump on his back or on his bandwagon.

Fellow Illinois Rep. Phil Crane has suggested Anderson is really a Democrat. Ronald Reagan has said he would only reluctantly support Anderson if he won the GOP presidential nomination. George Buh has launched an advertising campaign that accuses Anderson of wanting to cut Social Security benefits. Bush is telling audiences the congressman "is way out in left field."

Anderson claims to be unperturbed by it all. "I'm not gonna lose my cool because I've become the object of a gang attack," he said on a radio show this morning.

But he was worried enough about the impact of the attacks to call a press conference with his state chairman, former governor Richard Ogilvie, so that Ogilvie could testify that Anderson is really a good Republican after all.

"In my mind, there's absolutely no question about his credentials," Ogilvie told reporters in downtown Chicago.

The reason for all the attention is that Anderson has surged in the public opinion polls here which now show him locked neck-and-neck in the lead with Reagan.

The attacks began in a telvision debate Thursday night that escalated into one of the most lively confrontations of the political season. They continued today as Reagan, Bush and Anderson campaigned across the state.

During Thursday's debate, Anderson and Reagan refused to say whether they would support the other if he won the GOP nomination.

Reagan reluctantly backed off that today, eventually saying he would support the Illinois congressman "from the standpoint [that] at least you could get him on the telephone."

Anderson did say he would not endorse Democractic Sen. Edward Kennedy (D-Mass.), whom Reagan had suggested Anderson might prefer over him. Anderson also said, for the first time, that he would nt run as an independent candidate for the presidency as part of a third-party effort.

"'m not going to lead a third-party effort, I'm going to be the Republican nominee," he said.

The person most worried about Anderson was George Bush, who only a few weeks ago was leading polls here and is now running a weak third.

Bush, who has studiously avoided talking about issues for most of his campaign, said today he was switched strategies for the Illinois primary and will now concentrate strictly on issues. He said he will even refuse to answer non-issue questions from now on.

Quoting from Washington Bullet basketball coack Dick Motta, Bush told a student audienc e at West New Trier High School. "The opera isn't over 'til the fat lady sings."

Bush tried to prove that he intends to stick to the issues by making a detailed speech before the CHICAGO council on Foreign Relations this noon. During the well-received address, he lambasted President Carter for pursuing a "policy of bluff, bluster and political symbolism" in dealing with the Iranian hostage situation.

The former U.N. ambassador and CIA director accused Carter of continually misleading the public on the hostages' situation and in using little more than "wishful thinking" to secure their release, which he claimed was no closer than the day they were captured. The president has continually misjudged the situation, he said, "Jimmy Carter, it seems, has an infinite capacity to be misled in foreign affairs."

If he were president, Bush said, he would break off all relations with "the purported government of Iran," close the Iranian Embassy in Washington and expel all Iranian diplomats from the country.

He also endorsed a stringent economic embargo against all products proceeding to and from Iran.

Reagan, meanwhile, in a 14-hour day of campaigning across the state, described the Illinois contest as a "horse race" between himself and Anderson, echoing as assessment made Thursday by Reagan's pollster, Richard Wirthlin, who said the outcome next Tuesday was "too close to call."