Terminal connection does not work while browsers do

view full story

http://unix.stackexchange.com – I have such network layout: internet comes true fiber optics to modem. From modem LAN cable goes to router. Since that router wifi signal is weak LAN cable goes to another router from which I connect true wifi. TL;DR - Modem > router > router with wifi > me. Browser connects just fine. (I had to set up to use OpenDNS or Google (optional) DNS server since somewhy browser could not detect providers DNS; It was done in second router). And now I tried to ssh to other IP and noticed that terminal does not have any internet connection. How comes that browser can connect while simple ping does no (HowTos)