closed ports wifi problem
As those ports are closed on your router, there is no "on-phone solution", only "on-router solutions". You will have to open those ports on the router, use a different WiFi AP, or switch to your mobile data connection.

If you want to go for the "open ports on router" solution, this is beyond the scope of our site. But you're certainly welcome with that question on Super User, which (amongst others) covers personal and home computer networking according to their help center.