Hi,
go to the:
Control Panel\All Control Panel Items\Windows Firewall
and click on Advanced Settings in left sidebar.
Then search in Inbound or Outbound program you mentioned and check properties of software (game) you want to allow.
Be sure you checked in properties protocol and ports tab and both have correct settings for your game (since I don't how which ports/protocols HL uses.