closed ports wifi problem I have these following issues :

1) wifi connects but the signal bars stay grey 
2) I can open and search apps in market but when I try to download them , it says "waiting for network"
3) facebook does not sync, and the app says "no network"

after some googling I found that google syncs through ports 5228-5230, which are closed in my router. I have no idea how to open these ports. Is there an on-phone solution to this ?

my system is Micromax A116, NaturewizHD rom, jellybean 4.2.1 ( or 4.2.2 ? )
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.