Firstly, in order to fix the issue, go to Start, type Windows Firewall in the Search programs and files field and open the utility. Click the Allow a program or feature through Windows Firewall option, check the box next to Counter-Strike and click OK. After that, type Windows Firewall with Advanced Settings in the Search box, open the utility and go to Inbound Rules > New Rule. Check the Port box, click Next, select All local Ports and follow the self-explained steps. Also, make sure that your security program doesn't block the connection. If the problem persists, try uninstalling the game and then installing it again.