I believe fortifying lasts forever- if you fortify, you stay fortified until the player activates the unit. This adds ?25% defense if attacked.
Sentry keeps your unit immobile and "asleep" until an AI unit comes near, then they activate and can then attack or move. Since they wake up when a unit approaches, I believe it offers no defensive bonus, but I defer to more experienced players.