Prisijungti

Sveiki Turiu problema su narsykle

  • 10 Lap '14

Sveiki! neseniai isirasiau ubuntu 12.04 ir susiduriau su tokia problema neatvercia normaliai youtube,facebbok it t.t. patikrinus per google chrome klaidas randa va ka Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/cssbin/www-core- ... Qwx-md.css
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/cssbin/www-playe ... v8aIMq.css
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/cssbin/www-pagef ... yb8oCx.css
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/jsbin/www-schedu ... heduler.js
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/jsbin/html5playe ... 5player.js
2Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://www.youtube-nocookie.com/gen_204 ... 0leiZHMm0w
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/jsbin/spf-vflZzdE8U/spf.js
Failed to load resource: net::ERR_NAME_NOT_RESOLVED http://s.ytimg.com/yts/jsbin/www-en_US- ... a0/base.js
Uncaught ReferenceError: spf is not defined watch?v=JVlW1Ur4yW0:1656
Uncaught TypeError: undefined is not a function watch?v=JVlW1Ur4yW0:1657
Uncaught TypeError: undefined is not a function watch?v=JVlW1Ur4yW0:1762
15Uncaught TypeError: undefined is not a function
NORS Flash player yra.

TechtronicMindaugas N.
  • 10 Lap '14

net::ERR_NAME_NOT_RESOLVED reiskia, kad turi network problemu, o butent DNS.
Internetas veikia ? gali parasyti sias komandas (rasau ne viena, nes ne visos distros turi tokias komandas)
Patikrinti ar dns veikia:

dig +short s.ytimg.com
host s.ytimg.com
grep nameserver /etc/resolv.conf
  • 11 Lap '14

neras@neras-P35-DS3:~$ dig +short s.ytimg.com
;; Truncated, retrying in TCP mode.
neras@neras-P35-DS3:~$ host s.ytimg.com
;; Truncated, retrying in TCP mode.
Host s.ytimg.com not found: 5(REFUSED)
neras@neras-P35-DS3:~$ grep nameserver /etc/resolv.conf
nameserver 127.0.0.1
neras@neras-P35-DS3:~$
visos komandos va ka meta o internetas yra

TechtronicMindaugas N.
  • 11 Lap '14

Truputi keista, nezinau ka jau Ubuntu ten pakeites
Pagal ideja neturetu veikti internetas at all, na bet daleiskim naudoja kazka kito nei kitos distros... Gal dnsmasq, ar panasu dns toolza kuris taip keistai veikia.

Gali pameginti googles DNS serverius, tam tereiks pakeisti /etc/resolv.conf faile nameservers. pvz taip:

nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4

Pats pirmas bus 127.0.0.1 (toks koks yra dabar), todel neturetu del to kilti jokiu problemu. Pries keisdamas failus esancius /etc butinai sukurk ju kopijas.

Prie to pacio parasysiu paprasta buda kaip salinti reklamas bei pagreitinti "interneta".
Pirma tam reikes dnsmasq (Small forwarding/caching DNS server) kuri gauti galima parasius sia komanda:

sudo apt-get install dnsmasq

Toliau reikes sukurti nauja faila /etc/dnsmasq.conf, tik butinai sukurkit kopija jo ir pakeiskit vardenis i jusu user name.

mv /etc/dnsmasq.conf /etc/dnsmasq.conf-bak
echo 'conf-file=/home/vardenis/.dnsmasqrc' > /etc/dnsmasq.conf

Dabar is paprasto user (ne root) galime keisti dnsmasq konfiguracija /home/vardenis/.dnsmasqrc. Tame faile rasom:

interface=eth0
listen-address=127.0.0.1
resolv-file=/etc/resolv.dnsmasq.conf

Blokavimas reklamu paprastas, rasome i faila /home/vardenis/.dnsmasqrc:

address=/plus.google.com/127.0.0.1
address=/twitter.com/127.0.0.1
address=/yandex.ru/127.0.0.1

Sukuriam nauja faila /etc/resolv.dnsmasq.conf ir jame surasom googles dns serverius (nera butina googles aisku, galima naudoti ir tai ka grazina dhcp):

echo 'nameserver 8.8.8.8\nnameserver 8.8.4.4\n' > /etc/resolv.dnsmasq.conf

Toliau sukurkim faila /etc/resolv.conf.head, jis bus naudojamas kas karta generuojant /etc/resolv.conf faila.

echo 'nameserver 127.0.0.1' > /etc/resolv.conf.head

Dabar liko start/restart dnsmasq servisa

/etc/init.d/dnsmasq restart

Patikrinam ar veikia, ir ant kiek veikia geriau:

dig @8.8.8.8 google.lt | grep 'Query time'

;; Query time: 36 msec

dig google.lt | grep 'Query time'

;; Query time: 0 msec

Kaip matom dabar dns uzklausa uztruko 0 msec, kas yra tikrai puiku. Daugelis "moderniu" tinklapiu naudojasi soc tinklais, ir jie baisiai apkrauna musu narsykles, uzblokavus tokius tinklus tikrai pagreitina firefox'a ar chroma. Patikrinti ar veikia blokavimas galima su komanda:

dig +short twitter.com

127.0.0.1

Jeigu taip ir yra, tai valio!

Atsakyti