TF2 connection problem

ok so I was playing tf2 last week and it was running fine and all,but the next day it would not connect to any servers,I could see them,but it gave me the message "connection failed after 4 retries"
It may have to do with the fact that I just added a password to my router
btw HL2:DM isn't working either

any help is appreciated