You'll be defending the fort again. This time, however, you will have to face different enemies - the dwarves. The dwarves are pretty difficult opponents: they have more HP than most of your units. Their Berserkers deal huge damage, have over 110 HP and are able to regenerate 10 HP per turn. Their cannons are more powerful iterations of your catapults.
You begin the mission with quite a few units, but the portal is outside the castle. You will have to reshuffle your army inside the castle. You will be controlling a mage, whom you have recently freed. This mage plays like a hero - he can open chests and use potions and scrolls. Additionally, his attacks freeze enemies. Your opponents will attack from only one direction, that is the north (the big red arrow), but this will still be a demanding scenario.
Your main concern will be eliminating the enemy cannons (the red circles). These units are able to get rid of the defenders on your walls. There are a few ways to do that. The first one is to eliminate them with cavalry and your hero - wait until there's a gap between waves of attack and approach the cannons. The disadvantage here is that you cannot use the cavalry to counterattack the enemies at the gate.
You could also use an additional mage - even if you keep him behind the walls, he'll be able to reach the enemies. The simplest solution to get rid of the artillery is using Lightning or Fire Rain scrolls.
When it comes to defending the castle, you should weaken the dwarves with ranged units as much as you can - engage in melee combat only if you have no other alternative. If you freeze enemies at the gate, they won't be able to crush it.
Playing the mission on higher difficulty (orange arrows on the map above) obviously means more enemies. Every new group of dwarves will attack from a different side - the most dangerous groups are those with cannons (the circles), coming from southwest and east, behind the bridge. What doesn't change is the need to prioritize the cannons and ranged units - after destroying them, fighting the infantry should be relatively easy.