Auto-translated
It might be your firewall.
To make sure it's not blocking traffic, check:
======================================================
4.3 The game does not support working through an http proxy. The player will need a direct (real IP) or NAT (in most local networks) connection to the internet. In the case of a firewall, the player will need to open some ports:
6668 TCP (IRC servers (chat in the lobby))
From 40000 to 42999 TCP (various Ubi.com servers)
44000 UDP (CDKey servers)
45000 UDP (NAT server)
42500 UDP (Local CDKey port, can be set by the player in the game configuration files, "setvar net_ubi_cdkey_port = <desired port>", default is 42500)
8888, 8889 UDP UDP (The game itself, can be set by the player in the game configuration files, "setvar net_game_port = <desired port>", default is 8888; "setvar net_lan_match_maker_port = <desired port>", default is 8889)
======================================================
If it's not the firewall, then you might be using some kind of proxy to access the internet. But Heroes 5 does not support playing through it. In this case, no one can help you. Unless you change your connection method.