Minecraft wiki entry for Defense, associated text: A secret tunnel from the fortress or fake base to your real base, sealed off with a piston hatch or door at the entrance to the fortress, only operated from the inside (the side of the real base)
Moats, traps and/or sniping towers around. For towers, make sure they are only accessible from your own base(s)
A fortress-destruct button at the real base (in case it gets overrun by enemies and you have fled into your real base) to get rid yourself of the foes