I think I've found the answer in the transgaming forums, it is as follows:
"I've tried to fix this problem on my own, by reading the faq's, and howto's. When I use the command
winex hl.exe -console -toconsole -game cstrike +connect 220.127.116.11:27015
counter-strike loads correctly, but I get these messages:
NET Ports: server 27015, client 27005
WARNING: IPX_Socket: port: 27015 bind: WSAEINVAL
WARNING: IPX_Socket: port: 27005 bind: WSAEINVAL
WARNING: IPX_Socket: port: -1 bind: WSAEINVAL
Server IP address 127.0.0.1:27015
Could not get IPX socket name, IPX disabled
Connecting to 18.104.22.168:27015...
Connection failed after 4 retries.
I know using the -noipx will get rid of those errors in command line, but why can't I connect to any servers?
I'm positive that this is a firewall issue, because when I disable the firewall in Redhat 8 everything works fine.
Can somebody tell me what ports are required to be open, so that I can use counter-strike without having my system completely vulnerable? I have been trying to use Red Hat's Security Level tool, redhat-config-securitylevel. It's not really the best though.
Nevermind, I found the ports. They are as follows:
TCP ports 6000 to 6003, 7001 and 7002, and UDP ports 27005, 27010, 27015 and 27016.
So if anyone else is having the same problem this could be it. I have yet to test it though.