Stronghold Legends may be blocked from getting online. Due to your firewall not having ports opened. Some ports are required to play the Stronghold online.

It's also possible you can have two firewalls working such as a software one installed in Windows and a hardware one in your router. This could cause confusion for the game, if you have a hardware based firewall you may want to consider switching the software one off.

If you need help on how to configure your router, click here.
If you need help on configuring your firewall, click here or here.

The folllowing ports need to be opened to allow Stronghold Legends to run correctly:

Allow outgoing TCP connections to remote port 6667
Allow outgoing TCP connections to remote port 28910
Allow incoming & outgoing traffic via local UDP port 19966
Allow incoming & outgoing traffic via local UDP port 13139

Various software, such as an anti virus program could cause issues with multiplayer.
 
 
Microsoft have create a helpful guide for there own games, click here for help.