Trump, speaking at a joint press conference with Swedish Prime Minister Stefan Lofven, also claimed that the Russian interference did not affect the result of the 2016 race.
"The Russians had no impact on our votes whatsoever," said Trump, who has repeatedly played down the Russian influence and has strongly rejected allegations of collusion between his election campaign and Moscow.
"But certainly there was meddling and probably from other countries and maybe other individuals."
Asked if he was worried it would happen again, the president said: "We'll counteract whatever they do. We'll counteract it very strongly.
"You don't want your system of votes to be compromised in any way," he added. "And we won't allow that to happen."
"We haven't been given credit... but we're working very hard on the '18 election and the '20," Trump said.