Have you established a successful internet connection when connected to the router with a cable?
Judging by the fact you mentioned router & modem I would assume you have cable broadband. Switch off the modem and router for 5-10 minutes. Switch on modem, wait a minute or so, switch on router, wait another minute or so. Try the connection.