The attacks were the latest against military targets in the region, with security becoming a major campaign issue ahead of presidential and legislative elections next month.
President Muhammadu Buhari, who came to power in 2015 on a pledge to end the militancy, is seeking re-election in the February 16 polls, Presstv Reported.
Early on Sunday, troops fought off an attack by militants believed to be from the Abubakar Shekau faction of Boko Haram in the town of Pulka, along the border with Cameroon.
"The terrorists attacked around 1:15 am (0015 GMT) and soldiers engaged them in a 30-minute fight, forcing them to withdraw," a military officer said in an account confirmed by another officer.
The militants' intention was to attack and loot the town after overrunning the base, said the officer, who asked not to be identified because he was not authorized to speak to the media.
Late on Saturday, militants from the same faction attacked another base in Logomani Village near the town of Gamboru, leading to a fight that left six soldiers injured.
"Troops came under attack by Boko Haram terrorists who came in four gun trucks around 6:30 pm (1730 GMT)," the second officer told AFP.
"Six soldiers were wounded from bomb fragments," he said.
Boko Haram has intensified attacks on military targets in the region over the past several months.
On Wednesday and Thursday, the militants attacked three bases in Borno and neighboring Yobe State, stealing weapons and burning the bases.
Boko Haram's militancy in northeast Nigeria has claimed 27,000 lives since 2009.
More than two million people have also been forced to flee their homes, triggering a humanitarian crisis in the region.