Friends unable to join listen server

I was hosting a listen server, and as the title says; none of my friends were able to connect to it. It would say “connection failed after x retries.” Both ports 27015, and 27016 are both properly forwarded, and I typed “sv_lan 0” when the server started.

Does anyone have any ideas on how I can troubleshoot this?

do “hostport 27015” and it should work.

Edit: is your hostport even set to 27015?

What exactly do you mean is my host port set to 27015?

Ah. I used to have this problem. Hostport defaults to 27015, so if you haven’t changed it, it should be fine. But, you haven’t forwarded enough ports.

You’ll need to forward:
Port 1200
Port 27000 - 27015 (there should be an option to set all ports from one to another)
Port 27020 - 27039 (same as above)

I did that, after that it worked for me fine.

Hope this helps!

I took the advice of a few people, did the following:

forwarded 21005, typed hostport 27015 and heartbeat in console; and suddenly it worked. My problem is over, thanks for the help.